commit:     2a6dc1335a46d15eafd97470097668dfa1af74d6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 24 03:52:50 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 03:52:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a6dc133

dev-python/numexpr: fix build with numpy 1.23.0

Closes: https://bugs.gentoo.org/853955
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../numexpr/files/numexpr-2.8.1-numpy-1.23.0.patch | 22 ++++++++++++++++++++++
 dev-python/numexpr/numexpr-2.8.1-r1.ebuild         |  4 ++++
 2 files changed, 26 insertions(+)

diff --git a/dev-python/numexpr/files/numexpr-2.8.1-numpy-1.23.0.patch 
b/dev-python/numexpr/files/numexpr-2.8.1-numpy-1.23.0.patch
new file mode 100644
index 000000000000..b0e841077620
--- /dev/null
+++ b/dev-python/numexpr/files/numexpr-2.8.1-numpy-1.23.0.patch
@@ -0,0 +1,22 @@
+https://github.com/pydata/numexpr/commit/1c6a024947c3aa1bf926ecb9828036b306d7c6d7
+https://bugs.gentoo.org/853955
+
+From 1c6a024947c3aa1bf926ecb9828036b306d7c6d7 Mon Sep 17 00:00:00 2001
+From: Robert McLeod <[email protected]>
+Date: Mon, 24 Jan 2022 10:54:34 -0800
+Subject: [PATCH] Fix for #397, use of NPY_ARRAY_UPDATEIFCOPY flag
+
+ Changes from 2.8.0 to 2.8.1
+ ---------------------------
+--- a/numexpr/interpreter.cpp
++++ b/numexpr/interpreter.cpp
+@@ -1269,7 +1269,7 @@ NumExpr_run(NumExprObject *self, PyObject *args, 
PyObject *kwds)
+             }
+             Py_INCREF(dtypes[0]);
+             a = (PyArrayObject *)PyArray_FromArray(operands[0], dtypes[0],
+-                                        
NPY_ARRAY_ALIGNED|NPY_ARRAY_UPDATEIFCOPY);
++                                        NPY_ARRAY_ALIGNED);
+             if (a == NULL) {
+                 goto fail;
+             }
+

diff --git a/dev-python/numexpr/numexpr-2.8.1-r1.ebuild 
b/dev-python/numexpr/numexpr-2.8.1-r1.ebuild
index 494235d35671..55c558ac78d4 100644
--- a/dev-python/numexpr/numexpr-2.8.1-r1.ebuild
+++ b/dev-python/numexpr/numexpr-2.8.1-r1.ebuild
@@ -24,6 +24,10 @@ RDEPEND="${DEPEND}
        dev-python/packaging[${PYTHON_USEDEP}]
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-numpy-1.23.0.patch
+)
+
 python_test() {
        pushd "${BUILD_DIR}/install/usr/lib/${EPYTHON}/site-packages" 
>/dev/null || die
        "${EPYTHON}" - <<-EOF || die "Tests failed with ${EPYTHON}"

Reply via email to