[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
163/203: gnu: python-numpy: Update to 1.21.3 and cleanup.
From: |
guix-commits |
Subject: |
163/203: gnu: python-numpy: Update to 1.21.3 and cleanup. |
Date: |
Wed, 3 Nov 2021 21:10:32 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit b28bea99791898f98684470af37b79ee856129ad
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Sat Oct 23 02:07:52 2021 -0400
gnu: python-numpy: Update to 1.21.3 and cleanup.
* gnu/packages/python-xyz.scm (python-numpy): Update to 1.21.3.
[native-inputs]: Add python-hypothesis and python-pytest-xdist.
[phases]: Delete trailing #t. Do not explicitly reorder the check phase, as
it already runs after the install phase for the python build system.
{configure-blas-lapack}: Rename to...
{configure-blas}: ... this, to cleanup remnants of lapack left in commit
6623d1cd7f3.
{check}: Honor TESTS?. Invoke the tests via the runtests.py script and
enable
parallel tests.
(python2-numpy-1.8)[phases]{configure-blas-lapack}: Likewise (as for the
python-numpy package).
---
gnu/packages/python-xyz.scm | 61 ++++++++++++++++++---------------------------
1 file changed, 24 insertions(+), 37 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0ce8d46..3bca73b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5220,7 +5220,7 @@ writing C extensions for Python as easy as Python
itself.")
(define-public python-numpy
(package
(name "python-numpy")
- (version "1.17.3")
+ (version "1.21.3")
(source
(origin
(method url-fetch)
@@ -5229,38 +5229,32 @@ writing C extensions for Python as easy as Python
itself.")
version "/numpy-" version ".tar.gz"))
(sha256
(base32
- "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
+ "0s6hy8828yr7fcjiwnym4l8lrknr21gqfkaiawsf86n0hd0a5fyh"))))
(build-system python-build-system)
(inputs
`(("openblas" ,openblas)))
(native-inputs
`(("python-cython" ,python-cython)
+ ("python-hypothesis" ,python-hypothesis)
("python-pytest" ,python-pytest)
+ ("python-pytest-xdist" ,python-pytest-xdist)
("gfortran" ,gfortran)))
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'build 'configure-blas-lapack
+ (add-before 'build 'configure-blas
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "site.cfg"
(lambda (port)
(format port
- "[openblas]
+ "\
+[openblas]
libraries = openblas
library_dirs = ~a/lib
include_dirs = ~a/include
-
-# backslash-n to make emacs happy
-\n[lapack]
-lapack_libs = lapack
-library_dirs = ~a/lib
-include_dirs = ~a/include
"
(assoc-ref inputs "openblas")
- (assoc-ref inputs "openblas")
- (assoc-ref inputs "lapack")
- (assoc-ref inputs "lapack"))))
- #t))
+ (assoc-ref inputs "openblas"))))))
(add-before 'build 'fix-executable-paths
(lambda* (#:key inputs #:allow-other-keys)
;; Make /gnu/store/...-bash-.../bin/sh the default shell,
@@ -5271,21 +5265,17 @@ include_dirs = ~a/include
;; Use "gcc" executable, not "cc".
(substitute* "numpy/distutils/system_info.py"
(("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
- "c = distutils.ccompiler.new_compiler();
c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc
-shared')"))
- #t))
- ;; Tests can only be run after the library has been installed and not
- ;; within the source directory.
- (delete 'check)
- (add-after 'install 'check
- (lambda* (#:key outputs inputs #:allow-other-keys)
- ;; Make installed package available for running the tests
- (add-installed-pythonpath inputs outputs)
- ;; Make sure "f2py" etc is found.
- (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
- ":" (getenv "PATH")))
- (with-directory-excursion "/tmp"
- (invoke "python" "-c"
- "import numpy; numpy.test(verbose=2)")))))))
+ "c = distutils.ccompiler.new_compiler();
c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc
-shared')"))))
+ (replace 'check
+ (lambda* (#:key tests? outputs inputs #:allow-other-keys)
+ (when tests?
+ ;; Make installed package available for running the tests.
+ (add-installed-pythonpath inputs outputs)
+ ;; Make sure "f2py" etc is found.
+ (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
+ ":" (getenv "PATH")))
+ (invoke "./runtests.py"
+ "-j" (number->string (parallel-job-count)))))))))
(home-page "https://numpy.org")
(synopsis "Fundamental package for scientific computing with Python")
(description "NumPy is the fundamental package for scientific computing
@@ -5332,21 +5322,18 @@ capabilities.")
(substitute-keyword-arguments (package-arguments python2-numpy)
((#:phases phases)
`(modify-phases ,phases
- (replace 'configure-blas-lapack
+ (replace 'configure-blas
(lambda* (#:key inputs #:allow-other-keys)
(call-with-output-file "site.cfg"
(lambda (port)
(format port
"[openblas]
-libraries = openblas,lapack
-library_dirs = ~a/lib:~a/lib
-include_dirs = ~a/include:~a/include
+libraries = openblas
+library_dirs = ~a/lib
+include_dirs = ~a/include
"
(assoc-ref inputs "openblas")
- (assoc-ref inputs "lapack")
- (assoc-ref inputs "openblas")
- (assoc-ref inputs "lapack"))))
- #t))))))
+ (assoc-ref inputs "openblas"))))))))))
(native-inputs
`(("python2-nose" ,python2-nose)))
(description "NumPy is the fundamental package for scientific computing
- 49/203: gnu: e2fsprogs: Update to 1.46.4., (continued)
- 49/203: gnu: e2fsprogs: Update to 1.46.4., guix-commits, 2021/11/03
- 51/203: gnu: pulseaudio: Update to 15.0., guix-commits, 2021/11/03
- 124/203: gnu: libthai: Make datrie a normal native-input., guix-commits, 2021/11/03
- 130/203: gnu: webkitgtk: Use libsoup 3 and build with GCC., guix-commits, 2021/11/03
- 133/203: gnu: python-flit: Update to 3.3.0., guix-commits, 2021/11/03
- 146/203: gnu: nspr: Normalize inputs., guix-commits, 2021/11/03
- 138/203: profiles: Add a gdk-pixbuf-loaders-cache-file hook., guix-commits, 2021/11/03
- 154/203: gnu: python-dbusmock: Update to 0.24.0., guix-commits, 2021/11/03
- 149/203: gnu: meson: Update to 0.60.0., guix-commits, 2021/11/03
- 158/203: gnu: gdk-pixbuf: Remove obsolete jasper support., guix-commits, 2021/11/03
- 163/203: gnu: python-numpy: Update to 1.21.3 and cleanup.,
guix-commits <=
- 164/203: gnu: gdb: Update to 11.1 and remove gdb-9.2., guix-commits, 2021/11/03
- 165/203: gnu: ldc: Update to 1.27.1., guix-commits, 2021/11/03
- 166/203: gnu: python2-lit: Remove package., guix-commits, 2021/11/03
- 167/203: gnu: python-lit: Update to 12.0.1., guix-commits, 2021/11/03
- 169/203: gnu: Add meson-0.59., guix-commits, 2021/11/03
- 181/203: gnu: accountsservice: Use meson 0.59.4 to work around a bug in 0.60.0., guix-commits, 2021/11/03
- 188/203: gnu: gnome-online-accounts: Update to 3.43.1., guix-commits, 2021/11/03
- 195/203: gnu: openblas: Update to 0.3.18., guix-commits, 2021/11/03
- 197/203: gnu: ansible-core: Update to 2.11.6., guix-commits, 2021/11/03
- 57/203: gnu: Add a missing copyright., guix-commits, 2021/11/03