[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
52/64: gnu: python-numpy: Update to 1.26.0.
From: |
guix-commits |
Subject: |
52/64: gnu: python-numpy: Update to 1.26.0. |
Date: |
Thu, 2 May 2024 10:52:36 -0400 (EDT) |
rekado pushed a commit to branch wip-python-team
in repository guix.
commit 9bdce9a23d9f7df82165077c7581d1d650f5b1b0
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu May 2 09:52:09 2024 +0200
gnu: python-numpy: Update to 1.26.0.
* gnu/packages/python-xyz.scm (python-numpy): Update to 1.26.0.
[build-system]: Use pyproject-build-system.
[arguments]: Move test flags to #:test-flags; add phase
'use-setuptools-backend.
[native-inputs]: Remove gfortran; add replace python-cython with
python-cython-3; add meson/newer and ninja.
Change-Id: I783bbca58624bf6f047056ba21d838f5ecb09ac2
---
gnu/packages/python-xyz.scm | 97 +++++++++++++++++++++++++--------------------
1 file changed, 54 insertions(+), 43 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 84266073f1..cb4a6c87da 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8240,7 +8240,7 @@ writing C extensions for Python as easy as Python
itself.")
(define-public python-numpy
(package
(name "python-numpy")
- (version "1.23.2")
+ (version "1.26.0")
(source
(origin
(method url-fetch)
@@ -8249,15 +8249,52 @@ writing C extensions for Python as easy as Python
itself.")
version "/numpy-" version ".tar.gz"))
(sha256
(base32
- "00bx3idjwhmzkdawg2dx1bp0316ig37jfx0dm82bvyv1hbj013dp"))))
- (build-system python-build-system)
+ "1pvz1qcz7pvc13fsisfiz9lk35bk3jglkdnnp3iay5dzx27wfgzr"))))
+ (build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ #~(list "-k" (string-append
+ ;; These tests may fail on 32-bit systems (see:
+ ;; https://github.com/numpy/numpy/issues/18387).
+ "not test_float_remainder_overflow "
+ "and not test_pareto "
+ ;; The 'test_rint_big_int' test fails on older
+ ;; x86_64 CPUs such as the Core 2 Duo (see:
+ ;; https://github.com/numpy/numpy/issues/22170).
+ "and not test_rint_big_int "
+ ;; The huge_array test is too large for 32-bit (see:
+ ;; https://bugs.gentoo.org/843599 and
+ ;; https://bugs.gentoo.org/846548).
+ ;; TestKind.test_all is a Fortran type failure
+ ;; that may be toolchain or environment related.
+ #$@(if (or (target-x86?) (target-arm32?))
+ `(" and not test_identityless_reduction_huge_array"
+ " and not (TestKind and test_all)")
+ '())
+ ;; This test fails when building from aarch64-linux.
+ #$@(if (target-arm32?)
+ `(" and not test_features")
+ '())
+ ;; These tests seem to fail on machines without
+ ;; an FPU is still under investigation upstream.
+ ;; https://github.com/numpy/numpy/issues/20635
+ #$@(if (target-riscv64?)
+ `(" and not test_float"
+ " and not test_fpclass")
+ '())))
#:modules '((guix build utils)
(guix build python-build-system)
+ (guix build pyproject-build-system)
(ice-9 format))
#:phases
#~(modify-phases %standard-phases
+ ;; The meson build backend requires a bundled modified version of
+ ;; meson.
+ (add-after 'unpack 'use-setuptools-backend
+ (lambda _
+ (delete-file "pyproject.toml")
+ (rename-file "pyproject.toml.setuppy" "pyproject.toml")))
(add-before 'build 'parallelize-build
(lambda _
(setenv "NPY_NUM_BUILD_JOBS"
@@ -8286,50 +8323,24 @@ include_dirs = ~:*~a/include~%"
(substitute* "numpy/core/tests/test_cpu_features.py"
(("/bin/true") (search-input-file inputs "bin/true")))))
(replace 'check
- (lambda* (#:key tests? outputs inputs #:allow-other-keys)
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
(when tests?
- (invoke "./runtests.py" "-vv" "--no-build" "--mode=fast"
- "-j" (number->string (parallel-job-count))
- ;; Contrary to scipy, the runtests.py script of numpy
- ;; does *not* automatically provide -n when -j is used
- ;; (see: https://github.com/numpy/numpy/issues/21359).
- "--" "-n" (number->string (parallel-job-count))
- "-k" (string-append
- ;; These tests may fail on 32-bit systems (see:
- ;; https://github.com/numpy/numpy/issues/18387).
- "not test_float_remainder_overflow "
- "and not test_pareto "
- ;; The 'test_rint_big_int' test fails on older
- ;; x86_64 CPUs such as the Core 2 Duo (see:
- ;; https://github.com/numpy/numpy/issues/22170).
- "and not test_rint_big_int "
- ;; The huge_array test is too large for 32-bit
(see:
- ;; https://bugs.gentoo.org/843599 and
- ;; https://bugs.gentoo.org/846548).
- ;; TestKind.test_all is a Fortran type failure
- ;; that may be toolchain or environment related.
- #$@(if (or (target-x86?) (target-arm32?))
- `(" and not
test_identityless_reduction_huge_array"
- " and not (TestKind and test_all)")
- '())
- ;; This test fails when building from
aarch64-linux.
- #$@(if (target-arm32?)
- `(" and not test_features")
- '())
- ;; These tests seem to fail on machines without
- ;; an FPU is still under investigation upstream.
- ;; https://github.com/numpy/numpy/issues/20635
- #$@(if (target-riscv64?)
- `(" and not test_float"
- " and not test_fpclass")
- '())))))))))
- (native-inputs
- (list python-cython
+ (apply invoke "./runtests.py" "-vv" "--no-build" "--mode=fast"
+ "-j" (number->string (parallel-job-count))
+ ;; Contrary to scipy, the runtests.py script of numpy
+ ;; does *not* automatically provide -n when -j is used
+ ;; (see: https://github.com/numpy/numpy/issues/21359).
+ "--" "-n" (number->string (parallel-job-count))
+ test-flags)))))))
+ (native-inputs
+ (list ;; The presence of the optional gfortran causes the build to fail.
+ ;;gfortran
+ meson/newer ninja
+ python-cython-3
python-hypothesis
python-pytest
python-pytest-xdist
- python-typing-extensions
- gfortran))
+ python-typing-extensions))
(inputs (list bash openblas))
(home-page "https://numpy.org")
(synopsis "Fundamental package for scientific computing with Python")
- 42/64: gnu: python-distributed: Update to 2024.4.2., (continued)
- 42/64: gnu: python-distributed: Update to 2024.4.2., guix-commits, 2024/05/02
- 43/64: gnu: Add python-scikit-build-core., guix-commits, 2024/05/02
- 44/64: gnu: Add python-awkward-cpp., guix-commits, 2024/05/02
- 45/64: gnu: Add python-awkward., guix-commits, 2024/05/02
- 46/64: gnu: Add python-array-api-compat., guix-commits, 2024/05/02
- 47/64: gnu: python-anndata: Update to 0.10.7., guix-commits, 2024/05/02
- 48/64: gnu: python-biom-format: Untangle from python-scikit-bio., guix-commits, 2024/05/02
- 50/64: gnu: python-pandas-stubs: Update tests., guix-commits, 2024/05/02
- 49/64: gnu: python-scikit-bio: Update to 0.6.0., guix-commits, 2024/05/02
- 51/64: gnu: python-tabulate: Enable tests and fix version string., guix-commits, 2024/05/02
- 52/64: gnu: python-numpy: Update to 1.26.0.,
guix-commits <=
- 53/64: Revert "gnu: python-numpy: Update to 1.26.0.", guix-commits, 2024/05/02
- 54/64: gnu: python-dask: Disable all tokenize tests., guix-commits, 2024/05/02
- 56/64: gnu: python-umap-learn: Update to 0.5.6., guix-commits, 2024/05/02
- 59/64: gnu: python-dask: Disable some tests., guix-commits, 2024/05/02
- 58/64: gnu: python-dask: Propagate python-dask-expr., guix-commits, 2024/05/02
- 62/64: gnu: tadbit: Update to 1.0.1-2.2838129., guix-commits, 2024/05/02
- 57/64: gnu: python-umap-learn: Disable failing test., guix-commits, 2024/05/02
- 61/64: gnu: python-cooler: Update to 0.9.3., guix-commits, 2024/05/02
- 25/64: gnu: python-pandas: Default to version 2.x., guix-commits, 2024/05/02
- 40/64: gnu: python-partd: Update to 1.4.1., guix-commits, 2024/05/02