summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-05-26 15:58:54 +0200
committerMichał Górny <mgorny@gentoo.org>2024-05-26 15:58:54 +0200
commitbb5fe8ba348915acb41d4e87722da7f012772a9f (patch)
treee2ac87cb4a1ae38413ae1a2e96fb38cb4f146f04 /dev-python/numpy
parentsys-kernel/gentoo-kernel-bin: Bump to 6.9.2 (diff)
downloadgentoo-bb5fe8ba348915acb41d4e87722da7f012772a9f.tar.gz
gentoo-bb5fe8ba348915acb41d4e87722da7f012772a9f.tar.bz2
gentoo-bb5fe8ba348915acb41d4e87722da7f012772a9f.zip
dev-python/numpy: Backport emitted code fix to fix scipy w/ GCC-14
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/files/numpy-2.0.0_rc2-gcc14.patch23
-rw-r--r--dev-python/numpy/numpy-2.0.0_rc2-r1.ebuild (renamed from dev-python/numpy/numpy-2.0.0_rc2.ebuild)5
2 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/numpy/files/numpy-2.0.0_rc2-gcc14.patch b/dev-python/numpy/files/numpy-2.0.0_rc2-gcc14.patch
new file mode 100644
index 000000000000..f3ed3727520d
--- /dev/null
+++ b/dev-python/numpy/files/numpy-2.0.0_rc2-gcc14.patch
@@ -0,0 +1,23 @@
+From f3bc38235bf39a630035920e29f2f883cae5fffe Mon Sep 17 00:00:00 2001
+From: Matti Picus <matti.picus@gmail.com>
+Date: Sun, 26 May 2024 11:25:43 +0300
+Subject: [PATCH 1/3] BUG: cast missing in PyPy-specific f2py code
+
+---
+ numpy/f2py/cb_rules.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/f2py/cb_rules.py b/numpy/f2py/cb_rules.py
+index 721e075b6c73..faf8dd401301 100644
+--- a/numpy/f2py/cb_rules.py
++++ b/numpy/f2py/cb_rules.py
+@@ -122,7 +122,7 @@
+ #setdims#
+ #ifdef PYPY_VERSION
+ #define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)
+- capi_arglist_list = PySequence_List(capi_arglist);
++ capi_arglist_list = PySequence_List((PyObject *)capi_arglist);
+ if (capi_arglist_list == NULL) goto capi_fail;
+ #else
+ #define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)
+
diff --git a/dev-python/numpy/numpy-2.0.0_rc2.ebuild b/dev-python/numpy/numpy-2.0.0_rc2-r1.ebuild
index 0d97ca09f939..7cd370900a32 100644
--- a/dev-python/numpy/numpy-2.0.0_rc2.ebuild
+++ b/dev-python/numpy/numpy-2.0.0_rc2-r1.ebuild
@@ -52,6 +52,11 @@ EPYTEST_XDIST=1
distutils_enable_tests pytest
python_prepare_all() {
+ local PATCHES=(
+ # https://github.com/numpy/numpy/pull/26534
+ "${FILESDIR}/${P}-gcc14.patch"
+ )
+
append-flags -fno-strict-aliasing
distutils-r1_python_prepare_all