mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
package/python-numpy: fix build with python-cython >= 3.1
Since commitb536caaec0("package/python-cython: bump to version 3.1.2"), python-numpy fails to build: Error compiling Cython file: ------------------------------------------------------------ ... np.issubdtype(cov.dtype, np.complexfloating)): raise TypeError("mean and cov must not be complex") if size is None: shape = [] elif isinstance(size, (int, long, np.integer)): ^ ------------------------------------------------------------ numpy/random/_generator.pyx:3760:36: undeclared name not builtin: long Backport upstream patch to fix that build failure. Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Signed-off-by: Julien Olivain <ju.o@free.fr> (cherry picked from commitcfabe800ad) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
0d6e845891
commit
de41fbf7a0
34
package/python-numpy/0001-MNT-do-not-use-long-type.patch
Normal file
34
package/python-numpy/0001-MNT-do-not-use-long-type.patch
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
From 6dc2fd31f8a5a4ef502cb7734f004f5bce94e671 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas A Caswell <tcaswell@gmail.com>
|
||||||
|
Date: Sat, 18 Nov 2023 16:46:52 -0500
|
||||||
|
Subject: [PATCH] MNT: do not use `long` type
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Removed as type at language level 3 in ed7e95912b6ed7d20e190fbf1aecb9f2a997d479
|
||||||
|
in cython
|
||||||
|
|
||||||
|
Upstream: https://github.com/numpy/numpy/commit/6dc2fd31f8a5a4ef502cb7734f004f5bce94e671
|
||||||
|
|
||||||
|
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
|
||||||
|
---
|
||||||
|
numpy/random/_generator.pyx | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx
|
||||||
|
index d067e795eb5c..ae481d69d696 100644
|
||||||
|
--- a/numpy/random/_generator.pyx
|
||||||
|
+++ b/numpy/random/_generator.pyx
|
||||||
|
@@ -3757,7 +3757,7 @@ def multivariate_normal(self, mean, cov, size=None, check_valid='warn',
|
||||||
|
|
||||||
|
if size is None:
|
||||||
|
shape = []
|
||||||
|
- elif isinstance(size, (int, long, np.integer)):
|
||||||
|
+ elif isinstance(size, (int, np.integer)):
|
||||||
|
shape = [size]
|
||||||
|
else:
|
||||||
|
shape = size
|
||||||
|
--
|
||||||
|
2.49.1
|
||||||
|
|
||||||
Reference in New Issue
Block a user