GNU bug report logs - #75801
[PATCH python-team 0/2] NumPy 1+ and 2+.

Previous Next

Package: guix-patches;

Reported by: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Date: Fri, 24 Jan 2025 08:05:03 UTC

Severity: normal

Tags: patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 75801 <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 75801 <at> debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus <at> gmail.com>
Subject: [PATCH python-team 1/2] gnu: python-numpy: Update to 1.26.2.
Date: Fri, 24 Jan 2025 08:05:33 +0000
* gnu/packages/python-xyz.scm (python-numpy): Update to 1.26.2.
[arguments] <phases>: Add 'hide-gfortran.
[native-inputs]: Remove python-cython.

Change-Id: I1f02d45dd5c5bc7ad248dbbdc63a8e6a7a21ca9f
---
 gnu/packages/python-xyz.scm | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4b311cc9b1..88e1796143 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9224,11 +9224,12 @@ (define-public python-cython-3
 (define-public python-numpy
   (package
     (name "python-numpy")
-    ;; XXX: Any other versions up to 1.26.4 failed to build with error similar
-    ;; to: 'fenv_t' has not been declared in '::' 58 | using ::fenv_t;
-    ;; See <https://github.com/numpy/numpy/issues/21075#issuecomment-1047976197>,
-    ;; <https://github.com/numpy/numpy/issues/24318>.
-    (version "1.24.4")
+    ;; XXX: Shipped with vendored-meson which is needed for SIMD and
+    ;; BLAS/LAPACK features that are not yet available in upstream Meson.
+    ;; See <https://raw.githubusercontent.com/numpy/numpy/
+    ;; 2f3549c9d7c5048621568e431c86bc7530742723/doc/source/building/
+    ;; understanding_meson.rst>
+    (version "1.26.2")
     (source
      (origin
        (method url-fetch)
@@ -9237,7 +9238,7 @@ (define-public python-numpy
              version "/numpy-" version ".tar.gz"))
        (sha256
         (base32
-         "0qwldmkq5bns561ppkz7psphc4jqfj5j1x4dhq0i8r4qwjjf7xc0"))))
+         "1snknqb4hmv6b720nsaz21g7h6z1ikdvnsqyy5vmgavnfr23hmzn"))))
     (build-system pyproject-build-system)
     (arguments
      (list
@@ -9246,6 +9247,18 @@ (define-public python-numpy
                   (ice-9 format))
       #:phases
       #~(modify-phases %standard-phases
+          ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find
+          ;; the stdlib types when the gfortran header is used.  Remove
+          ;; gfortran from CPLUS_INCLUDE_PATH as a workaround.
+          ;; Taken from <https://issues.guix.gnu.org/73439#45>.
+          (add-after 'set-paths 'hide-gfortran
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((gfortran (assoc-ref inputs "gfortran")))
+                (setenv "CPLUS_INCLUDE_PATH"
+                        (string-join
+                         (delete (string-append gfortran "/include/c++")
+                                 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
+                         ":")))))
           (add-before 'build 'parallelize-build
             (lambda _
               (setenv "NPY_NUM_BUILD_JOBS"
@@ -9328,7 +9341,6 @@ (define-public python-numpy
      (list gfortran
            meson-python
            pkg-config
-           python-cython ;; overwrite Cython from meson-python
            python-hypothesis
            python-mypy
            python-pytest
-- 
2.47.1





This bug report was last modified 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.