mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-numpy-2: Enable tests.
* gnu/packages/python-xyz.scm (python-numpy-2) [arguments] <tests?>: Enable them. <test-flags>: Run fast test suite only. <phases>: Use custom 'check; Adjust path to Python in 'fix-executable-paths. Change-Id: I267bca274fc8d3ea87aaf14eb59b5297ccb2d227
This commit is contained in:
parent
3d9279b009
commit
9801822b8b
1 changed files with 15 additions and 4 deletions
|
@ -9947,18 +9947,24 @@ capabilities.")
|
||||||
"13sdvwiqn85vw1dn1k1nd5ihadv82zhqm615imrqgmil33v0csgd"))))
|
"13sdvwiqn85vw1dn1k1nd5ihadv82zhqm615imrqgmil33v0csgd"))))
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
;; TODO: Tests fail on setup, there is some issue with vendored-meson.
|
|
||||||
#:tests? #f
|
|
||||||
#:modules '((guix build utils)
|
#:modules '((guix build utils)
|
||||||
(guix build pyproject-build-system)
|
(guix build pyproject-build-system)
|
||||||
(ice-9 format))
|
(ice-9 format))
|
||||||
|
|
||||||
|
#:test-flags
|
||||||
|
#~(list "-m" "not slow"
|
||||||
|
"--numprocesses" (number->string (min 8 (parallel-job-count))))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-executable-paths
|
(add-after 'unpack 'fix-executable-paths
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "numpy/distutils/exec_command.py"
|
(substitute* "numpy/distutils/exec_command.py"
|
||||||
(("'/bin/sh'")
|
(("'/bin/sh'")
|
||||||
(format #f "~s" (which "bash"))))))
|
(format #f "~s" (which "bash"))))
|
||||||
|
(substitute* "numpy/meson.build"
|
||||||
|
;; Relay on python from the PATH instead of full reference
|
||||||
|
;; stored in built wheel.
|
||||||
|
(("'py.full_path\\(\\)'") "'python'"))))
|
||||||
(add-before 'build 'parallelize-build
|
(add-before 'build 'parallelize-build
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "OMP_NUM_THREAD"
|
(setenv "OMP_NUM_THREAD"
|
||||||
|
@ -9985,7 +9991,12 @@ capabilities.")
|
||||||
"[openblas]
|
"[openblas]
|
||||||
libraries = openblas
|
libraries = openblas
|
||||||
library_dirs = ~a/lib
|
library_dirs = ~a/lib
|
||||||
include_dirs = ~:*~a/include~%" #$(this-package-input "openblas")))))))))
|
include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key tests? test-flags #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(with-directory-excursion #$output
|
||||||
|
(apply invoke "pytest" test-flags))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list gfortran
|
(list gfortran
|
||||||
meson-python
|
meson-python
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue