Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/numexpr/files/, dev-python/numexpr/
Date: Fri, 24 Jun 2022 03:53:22
Message-Id: 1656042770.2a6dc1335a46d15eafd97470097668dfa1af74d6.sam@gentoo
1 commit: 2a6dc1335a46d15eafd97470097668dfa1af74d6
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 03:52:50 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 24 03:52:50 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a6dc133
7
8 dev-python/numexpr: fix build with numpy 1.23.0
9
10 Closes: https://bugs.gentoo.org/853955
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../numexpr/files/numexpr-2.8.1-numpy-1.23.0.patch | 22 ++++++++++++++++++++++
14 dev-python/numexpr/numexpr-2.8.1-r1.ebuild | 4 ++++
15 2 files changed, 26 insertions(+)
16
17 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
18 new file mode 100644
19 index 000000000000..b0e841077620
20 --- /dev/null
21 +++ b/dev-python/numexpr/files/numexpr-2.8.1-numpy-1.23.0.patch
22 @@ -0,0 +1,22 @@
23 +https://github.com/pydata/numexpr/commit/1c6a024947c3aa1bf926ecb9828036b306d7c6d7
24 +https://bugs.gentoo.org/853955
25 +
26 +From 1c6a024947c3aa1bf926ecb9828036b306d7c6d7 Mon Sep 17 00:00:00 2001
27 +From: Robert McLeod <robbmcleod@×××××.com>
28 +Date: Mon, 24 Jan 2022 10:54:34 -0800
29 +Subject: [PATCH] Fix for #397, use of NPY_ARRAY_UPDATEIFCOPY flag
30 +
31 + Changes from 2.8.0 to 2.8.1
32 + ---------------------------
33 +--- a/numexpr/interpreter.cpp
34 ++++ b/numexpr/interpreter.cpp
35 +@@ -1269,7 +1269,7 @@ NumExpr_run(NumExprObject *self, PyObject *args, PyObject *kwds)
36 + }
37 + Py_INCREF(dtypes[0]);
38 + a = (PyArrayObject *)PyArray_FromArray(operands[0], dtypes[0],
39 +- NPY_ARRAY_ALIGNED|NPY_ARRAY_UPDATEIFCOPY);
40 ++ NPY_ARRAY_ALIGNED);
41 + if (a == NULL) {
42 + goto fail;
43 + }
44 +
45
46 diff --git a/dev-python/numexpr/numexpr-2.8.1-r1.ebuild b/dev-python/numexpr/numexpr-2.8.1-r1.ebuild
47 index 494235d35671..55c558ac78d4 100644
48 --- a/dev-python/numexpr/numexpr-2.8.1-r1.ebuild
49 +++ b/dev-python/numexpr/numexpr-2.8.1-r1.ebuild
50 @@ -24,6 +24,10 @@ RDEPEND="${DEPEND}
51 dev-python/packaging[${PYTHON_USEDEP}]
52 "
53
54 +PATCHES=(
55 + "${FILESDIR}"/${P}-numpy-1.23.0.patch
56 +)
57 +
58 python_test() {
59 pushd "${BUILD_DIR}/install/usr/lib/${EPYTHON}/site-packages" >/dev/null || die
60 "${EPYTHON}" - <<-EOF || die "Tests failed with ${EPYTHON}"