aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2024-08-27 17:33:06 +0200
committerLudovic Courtès <ludo@gnu.org>2024-09-05 10:14:24 +0200
commit0852461c4ffce56754b62e200bdbfbd1cc20c982 (patch)
tree1932ce7459c7b9a355a82183b9cdab4fd51dcd7a /gnu
parent23e62a1529c206f56a74c16e9f1dbb28318ec0a7 (diff)
downloadguix-0852461c4ffce56754b62e200bdbfbd1cc20c982.tar
guix-0852461c4ffce56754b62e200bdbfbd1cc20c982.tar.gz
gnu: python-petsc4py: Update to 3.21.4.
* gnu/packages/maths.scm (python-petsc4py): Update to 3.21.4. [source](modules, snippet): Remove. [arguments]: Switch to gexps. Rename ‘pre-build’ phase to ‘set-PETSC_DIR’. Replace ‘check’ phase. [native-inputs]: Switch to ‘python-cython-3’. [inputs]: Remove labels. Change-Id: I2d8ef3519f6ffe93ff761ef99c4b8951b6107e1c
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/maths.scm44
1 files changed, 17 insertions, 27 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index ebce10bde5..4cddcdd285 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3738,41 +3738,31 @@ scientific applications modeled by partial differential equations.")
(define-public python-petsc4py
(package
(name "python-petsc4py")
- (version "3.16.1")
+ (version "3.21.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "petsc4py" version))
(sha256
(base32
- "0pxr6qa7p0pmpq0av29lx8lzlrdcfdzj87ynixzr8dn42y13a662"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Ensure source file is regenerated in the build phase.
- (delete-file "src/petsc4py.PETSc.c")
- ;; Remove legacy GC code. See
- ;; https://bitbucket.org/petsc/petsc4py/issues/125.
- (substitute* "src/PETSc/cyclicgc.pxi"
- ((".*gc_refs.*") "" )
- ((".*PyGC_Head.*") ""))
- #t))))
+ "1kffxhcwkx6283n2p83ymanz6m8j2xmz5kpa5s8qc4f9iiah59sb"))))
(build-system python-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'build 'pre-build
- (lambda _
- ;; Define path to PETSc installation.
- (setenv "PETSC_DIR" (assoc-ref %build-inputs "petsc"))
- #t))
- (add-before 'check 'mpi-setup
- ,%openmpi-setup))))
- (native-inputs
- (list python-cython))
- (inputs
- `(("petsc" ,petsc-openmpi)
- ("python-numpy" ,python-numpy)))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'set-PETSC_DIR
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Define path to PETSc installation.
+ (setenv "PETSC_DIR"
+ (assoc-ref inputs "petsc-openmpi"))))
+ (add-before 'check 'mpi-setup
+ #$%openmpi-setup)
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "test/runtests.py")))))))
+ (native-inputs (list python-cython-3))
+ (inputs (list petsc-openmpi python-numpy))
(home-page "https://bitbucket.org/petsc/petsc4py/")
(synopsis "Python bindings for PETSc")
(description "PETSc, the Portable, Extensible Toolkit for