[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch core-packages-team updated: gnu: python-numpy: Update to 1.26.4;
From: |
guix-commits |
Subject: |
branch core-packages-team updated: gnu: python-numpy: Update to 1.26.4; and build with gcc-14. |
Date: |
Wed, 11 Dec 2024 18:12:42 -0500 |
This is an automated email from the git hooks/post-receive script.
janneke pushed a commit to branch core-packages-team
in repository guix.
The following commit(s) were added to refs/heads/core-packages-team by this
push:
new 3d3a70ead0 gnu: python-numpy: Update to 1.26.4; and build with gcc-14.
3d3a70ead0 is described below
commit 3d3a70ead08bfe4431a712384d0390632e014aab
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Dec 11 21:36:22 2024 +0100
gnu: python-numpy: Update to 1.26.4; and build with gcc-14.
* gnu/packages/patches/python-numpy-gcc-14.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/python-xyz.scm (python-numpy): Update to 1.26.4 and use it.
[arguments]: Add phase "setup-build-environment". In phase "check", disable
more tests.
[native-inputs]: Add gcc-14 before gfortran so that gfortran's fenv.h
include
doesn't win and break the build.
Change-Id: I63d3f1668c5b7a75161c1dc189c26635092c0b64
---
gnu/local.mk | 1 +
gnu/packages/patches/python-numpy-gcc-14.patch | 14 +++++++++++
gnu/packages/python-xyz.scm | 32 +++++++++++++++++++++-----
3 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 873cede29f..3cd603559a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1945,6 +1945,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-feedparser-missing-import.patch \
%D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-matplotlib-fix-legend-loc-best-test.patch
\
+ %D%/packages/patches/python-numpy-gcc-14.patch \
%D%/packages/patches/python-random2-getrandbits-test.patch \
%D%/packages/patches/python-pillow-use-zlib-1.3.patch \
%D%/packages/patches/python-pyreadstat-link-libiconv.patch \
diff --git a/gnu/packages/patches/python-numpy-gcc-14.patch
b/gnu/packages/patches/python-numpy-gcc-14.patch
new file mode 100644
index 0000000000..1d022108c7
--- /dev/null
+++ b/gnu/packages/patches/python-numpy-gcc-14.patch
@@ -0,0 +1,14 @@
+Upstream status: Not presented upstream.
+
+--- numpy-1.26.4/numpy/core/src/common/half_private.hpp.orig 2024-12-11
22:32:59.883085553 +0100
++++ numpy-1.26.4/numpy/core/src/common/half_private.hpp 2024-12-11
22:33:05.291112742 +0100
+@@ -1,6 +1,9 @@
+ #ifndef NUMPY_CORE_SRC_COMMON_HALF_PRIVATE_HPP
+ #define NUMPY_CORE_SRC_COMMON_HALF_PRIVATE_HPP
+
++int fetestexcept (int);
++int feclearexcept (int);
++int feraiseexcept (int);
+ #include "npstd.hpp"
+ #include "float_status.hpp"
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8a8c0a345c..c4a3c46fa6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8597,7 +8597,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.4")
(source
(origin
(method url-fetch)
@@ -8606,7 +8606,8 @@ writing C extensions for Python as easy as Python
itself.")
version "/numpy-" version ".tar.gz"))
(sha256
(base32
- "00bx3idjwhmzkdawg2dx1bp0316ig37jfx0dm82bvyv1hbj013dp"))))
+ "0410j6jfz1yzm5s0v0yrc1j0q6ih4322357and7arr0jxnlsn0ia"))
+ (patches (search-patches "python-numpy-gcc-14.patch"))))
(build-system python-build-system)
(arguments
(list
@@ -8615,6 +8616,10 @@ writing C extensions for Python as easy as Python
itself.")
(ice-9 format))
#:phases
#~(modify-phases %standard-phases
+ (add-before 'build 'setup-build-environment
+ (lambda _
+ (setenv "CFLAGS"
+ "-g -O2 -Wno-error=implicit-function-declaration")))
(add-before 'build 'parallelize-build
(lambda _
(setenv "NPY_NUM_BUILD_JOBS"
@@ -8676,16 +8681,31 @@ include_dirs = ~:*~a/include~%"
;; 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")
- '())))))))))
+ ;; They also fail with gcc-14
+ " and not test_float"
+ " and not test_fpclass"
+
+ ;; These tests fail with gcc-14
+ " and not test_context_locality"
+ " and not test_cosh"
+ " and not test_default_policy_singleton"
+ " and not test_exp_exceptions"
+ " and not test_half_fpe"
+ " and not test_owner_is_base"
+ " and not test_policy_propagation"
+ " and not test_set_policy"
+ " and not test_sinh"
+ " and not test_square_values"
+ " and not test_sum"
+ " and not test_switch_owner"
+ " and not test_thread_locality"))))))))
(native-inputs
(list python-cython
python-hypothesis
python-pytest
python-pytest-xdist
python-typing-extensions
+ gcc-14 ;fevn.h c[++] include must precede fortran's
gfortran))
(inputs (list bash openblas))
(home-page "https://numpy.org")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch core-packages-team updated: gnu: python-numpy: Update to 1.26.4; and build with gcc-14.,
guix-commits <=