guix_mirror_bot pushed a commit to branch master
in repository guix.

commit c608175c5d6fd750c3bb812142016679821c2bfd
Author: Nicolas Graves <[email protected]>
AuthorDate: Sun Sep 28 13:56:45 2025 +0200

    gnu: python-mpi4py: Switch to pyproject.
    
    * gnu/packages/mpi.scm (python-mpi4py):
    [source]: Switch to git-fetch.
    [build-system]: Switch to pyproject-build-system.
    [arguments, description]: Improve style.
    [native-inputs]: Add python-cython-0, python-pytest,
    python-setuptools.
    
    Change-Id: I3d21936ce3dc368d358174a984885f7450032195
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/mpi.scm | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 30d0eac330..694aac3354 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -36,7 +36,7 @@
   #:use-module (guix deprecation)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
-  #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
@@ -62,6 +62,8 @@
   #:use-module (gnu packages parallel)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages version-control)
@@ -531,33 +533,35 @@ only provides @code{MPI_THREAD_FUNNELED}.")))
     (version "3.1.4")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "mpi4py" version))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mpi4py/mpi4py";)
+             (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "101lz7bnm9l17nrkbg6497kxscyh53aah7qd2b820ck2php8z18p"))))
-    (build-system python-build-system)
+        (base32 "1iy6087w7r2ip2kzinvfvjvqy7idbk0jn9ing44q1ggmgk2kx8sc"))))
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'build 'mpi-setup
-           ,%openmpi-setup)
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'build 'mpi-setup #$%openmpi-setup)
          (add-before 'check 'pre-check
            (lambda _
              ;; Skip BaseTestSpawn class (causes error 'ompi_dpm_dyn_init()
              ;; failed --> Returned "Unreachable"' in chroot environment).
              (substitute* "test/test_spawn.py"
                (("unittest.skipMPI\\('openmpi\\(<3.0.0\\)'\\)")
-                "unittest.skipMPI('openmpi')"))
-             #t)))))
-    (inputs
-     (list openmpi))
-    (properties
-     '((updater-extra-inputs . ("openmpi"))))
+                 "unittest.skipMPI('openmpi')")))))))
+    (native-inputs (list python-cython-0 python-pytest python-setuptools))
+    (inputs (list openmpi))
+    (properties '((updater-extra-inputs "openmpi")))
     (home-page "https://github.com/mpi4py/mpi4py";)
     (synopsis "Python bindings for the Message Passing Interface standard")
-    (description "MPI for Python (mpi4py) provides bindings of the Message
-Passing Interface (MPI) standard for the Python programming language, allowing
-any Python program to exploit multiple processors.
+    (description
+     "MPI for Python (mpi4py) provides bindings of the Message Passing
+Interface (MPI) standard for the Python programming language, allowing any
+Python program to exploit multiple processors.
 
 mpi4py is constructed on top of the MPI-1/MPI-2 specification and provides an
 object oriented interface which closely follows MPI-2 C++ bindings.  It

Reply via email to