mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-28 19:56:59 -06:00
gnu: python-numpy: Reduce closure size through custom wrap phase
* gnu/packages/python-xyz.scm (python-numpy) [arguments] <phases>: Provide custom 'wrap phase. Change-Id: Iab5bbee198796b61364fc3116a748e0e71b79148 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
parent
618155f79d
commit
110dd35a88
1 changed files with 15 additions and 1 deletions
|
|
@ -10968,7 +10968,21 @@ include_dirs = ~:*~a/include~%" #$(this-package-input "openblas"))))))
|
|||
(lambda* (#:key tests? test-flags #:allow-other-keys)
|
||||
(when tests?
|
||||
(with-directory-excursion #$output
|
||||
(apply invoke "pytest" test-flags))))))))
|
||||
(apply invoke "pytest" test-flags)))))
|
||||
;; The executables provided by this package ('f2py' and 'numpy-config')
|
||||
;; only depend on Python. By customizing the wrap phase we can ensure
|
||||
;; that we don't add all Python packages listed in native-inputs to
|
||||
;; the closure. This significantly reduces the overall closure size.
|
||||
;;
|
||||
;; See also <https://bugs.gnu.org/25235>.
|
||||
(replace 'wrap
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(for-each
|
||||
(lambda (program)
|
||||
(wrap-program program
|
||||
`("GUIX_PYTHONPATH" ":" suffix
|
||||
,(list (site-packages inputs outputs)))))
|
||||
(find-files (in-vicinity #$output "/bin"))))))))
|
||||
(native-inputs
|
||||
(list gfortran
|
||||
meson-python
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue