mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-scipy: Move input fields below arguments field.
* gnu/packages/python-science.scm (python-scipy): Move inputs fields below the arguments field. [phases]: Use gexp. {configure-openblas}: Use this-package-input. {check}: Remove extraneous 'add-installed-pythonpath' call. {install-doc}: Adjust accordingly.
This commit is contained in:
parent
3f66c30dbd
commit
5a3634f461
1 changed files with 77 additions and 78 deletions
|
@ -6,7 +6,7 @@
|
||||||
;;; Copyright © 2016, 2022 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2016, 2022 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2016-2020, 2022 Marius Bakke <marius@gnu.org>
|
;;; Copyright © 2016-2020, 2022 Marius Bakke <marius@gnu.org>
|
||||||
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2019, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
|
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
|
||||||
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
|
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
|
||||||
;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
|
;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
|
||||||
|
@ -80,25 +80,12 @@
|
||||||
(uri (pypi-uri "scipy" version))
|
(uri (pypi-uri "scipy" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1gxsnw6viz2j3sm8ak2a8l7fcn4b2zm3kzfm8w57xxyyrzx7an5b"))))
|
(base32 "1gxsnw6viz2j3sm8ak2a8l7fcn4b2zm3kzfm8w57xxyyrzx7an5b"))))
|
||||||
(build-system python-build-system)
|
|
||||||
(propagated-inputs
|
|
||||||
(list python-numpy python-matplotlib python-pyparsing))
|
|
||||||
(inputs
|
|
||||||
(list openblas pybind11))
|
|
||||||
(native-inputs
|
|
||||||
(list python-cython
|
|
||||||
python-pydata-sphinx-theme
|
|
||||||
python-pytest
|
|
||||||
python-sphinx
|
|
||||||
python-sphinx-panels
|
|
||||||
python-numpydoc
|
|
||||||
gfortran
|
|
||||||
perl
|
|
||||||
which))
|
|
||||||
(outputs '("out" "doc"))
|
(outputs '("out" "doc"))
|
||||||
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'disable-pythran
|
(add-after 'unpack 'disable-pythran
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "SCIPY_USE_PYTHRAN" "0")))
|
(setenv "SCIPY_USE_PYTHRAN" "0")))
|
||||||
|
@ -118,7 +105,7 @@
|
||||||
(string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
|
(string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
|
||||||
m)))))
|
m)))))
|
||||||
(add-before 'build 'configure-openblas
|
(add-before 'build 'configure-openblas
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _
|
||||||
(call-with-output-file "site.cfg"
|
(call-with-output-file "site.cfg"
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(format port
|
(format port
|
||||||
|
@ -132,15 +119,16 @@ include_dirs = ~a/include
|
||||||
library_dirs = ~a/lib
|
library_dirs = ~a/lib
|
||||||
atlas_libs = openblas
|
atlas_libs = openblas
|
||||||
"
|
"
|
||||||
(assoc-ref inputs "openblas")
|
#$(this-package-input "openblas")
|
||||||
(assoc-ref inputs "openblas")
|
#$(this-package-input "openblas")
|
||||||
(assoc-ref inputs "openblas"))))))
|
#$(this-package-input "openblas"))))))
|
||||||
(add-after 'install 'install-doc
|
(add-after 'install 'install-doc
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let* ((data (string-append (assoc-ref outputs "doc") "/share"))
|
(let* ((data (string-append (assoc-ref outputs "doc") "/share"))
|
||||||
(doc (string-append data "/doc/" ,name "-" ,version))
|
(doc (string-append data "/doc/" #$name "-" #$version))
|
||||||
(html (string-append doc "/html"))
|
(html (string-append doc "/html"))
|
||||||
(pyver ,(string-append "PYVER=" (version-major+minor
|
(pyver (string-append "PYVER="
|
||||||
|
#$(version-major+minor
|
||||||
(package-version python))))
|
(package-version python))))
|
||||||
;; By default it tries to run sphinx-build through the Python
|
;; By default it tries to run sphinx-build through the Python
|
||||||
;; interpreter which won't work with our shell wrapper.
|
;; interpreter which won't work with our shell wrapper.
|
||||||
|
@ -164,10 +152,21 @@ atlas_libs = openblas
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
(lambda* (#:key tests? inputs outputs #:allow-other-keys)
|
||||||
(when tests?
|
(when tests?
|
||||||
(add-installed-pythonpath inputs outputs)
|
|
||||||
(with-directory-excursion "/tmp"
|
(with-directory-excursion "/tmp"
|
||||||
(invoke "python" "-c"
|
(invoke "python" "-c"
|
||||||
"import scipy; scipy.test(verbose=2)"))))))))
|
"import scipy; scipy.test(verbose=2)"))))))))
|
||||||
|
(propagated-inputs (list python-numpy python-matplotlib python-pyparsing))
|
||||||
|
(inputs (list openblas pybind11))
|
||||||
|
(native-inputs
|
||||||
|
(list python-cython
|
||||||
|
python-pydata-sphinx-theme
|
||||||
|
python-pytest
|
||||||
|
python-sphinx
|
||||||
|
python-sphinx-panels
|
||||||
|
python-numpydoc
|
||||||
|
gfortran
|
||||||
|
perl
|
||||||
|
which))
|
||||||
(home-page "https://www.scipy.org/")
|
(home-page "https://www.scipy.org/")
|
||||||
(synopsis "The Scipy library provides efficient numerical routines")
|
(synopsis "The Scipy library provides efficient numerical routines")
|
||||||
(description "The SciPy library is one of the core packages that make up
|
(description "The SciPy library is one of the core packages that make up
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue