Skip to contentSkip to conversation

package/python-scipy: fix build with cython >=3.1.0

PATCH Applied Thomas Perale via buildroot 1 participant 6 messages Oct 20 – Oct 23 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/python-scipy: fix build with cython >=3.1.0

Since Cython version 3.1.0 [1] and buildroot commit [2] python-scipy failed to build. This has been fixed upstream with [3].

This commit backports it to fix the build with the cython present in 2025.02.x.

[1] https://github.com/cython/cython/commit/ed7e95912b6ed7d20e190fbf1aecb9f2a997d479
[2] b536caaec0 package/python-cython: bump to version 3.1.2
[3] https://github.com/scipy/scipy/commit/217748476403a1e5726a921cedb674e7ffbc952e

Fixes b536caaec0 package/python-cython: bump to version 3.1.2
---
 ...e-int-instead-of-long-in-cython-code.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch
package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch new file +37 -0
new file mode 100644
index 0000000000..6763c8cc5e
@@ -0,0 +1,37 @@
+From 217748476403a1e5726a921cedb674e7ffbc952e Mon Sep 17 00:00:00 2001
+From: Thomas A Caswell <[email protected]>
+Date: Thu, 21 Dec 2023 14:20:52 -0500
+Subject: [PATCH] MNT: use int instead of long in cython code (#19725)
+
+https://github.com/cython/cython/pull/5830 /
+d7e95912b6ed7d20e190fbf1aecb9f2a997d479 in cython removed
+long as a valid type in favor of int.
+
+Upstream: https://github.com/scipy/scipy/commit/217748476403a1e5726a921cedb674e7ffbc952e
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ scipy/_lib/_ccallback_c.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/scipy/_lib/_ccallback_c.pyx b/scipy/_lib/_ccallback_c.pyx
+index 59ba74369267..6c493dac7c9c 100644
+--- a/scipy/_lib/_ccallback_c.pyx
++++ b/scipy/_lib/_ccallback_c.pyx
+@@ -58,7 +58,7 @@ def get_raw_capsule(func_obj, name_obj, context_obj):
+     elif context_obj is None:
+         context = NULL
+     else:
+-        context = PyLong_AsVoidPtr(long(context_obj))
++        context = PyLong_AsVoidPtr(int(context_obj))
+ 
+     if PyCapsule_CheckExact(func_obj):
+         capsule_name = PyCapsule_GetName(func_obj)
+@@ -70,7 +70,7 @@ def get_raw_capsule(func_obj, name_obj, context_obj):
+         if name == NULL:
+             name = capsule_name
+     else:
+-        func = PyLong_AsVoidPtr(long(func_obj))
++        func = PyLong_AsVoidPtr(int(func_obj))
+ 
+     if name == NULL:
+         name_copy = name
Signature · 6 lines
2.56.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 2/3 package/python-scipy: fix build with GCC14

When building python-scipy package with target GCC14 the following error would occure:

../scipy/interpolate/src/_fitpackmodule.c: In function ‘fitpack_bispev’:
../scipy/interpolate/src/_fitpackmodule.c:255:10: error: assignment to ‘npy_int32 *’ {aka ‘long int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
255 | iwrk = (int *)(wrk + lwrk);
| ^

This has been fixed upstream with the patch [1] introduced in scipy version '1.13.0'. For more information see [2].

Backport this patch into the current 2025.02.x scipy version.

[1] https://github.com/scipy/scipy/commit/fdf3b908eeb93203c1847c6fb4efd12e88c37ce5
[2] https://github.com/scipy/scipy/pull/20135

---
 ...e-F_INT-as-int-rather-than-npy_int32.patch | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/python-scipy/0003-interpolate-define-F_INT-as-int-rather-than-npy_int32.patch
package/python-scipy/0003-interpolate-define-F_INT-as-int-rather-than-npy_int32.patch new file +50 -0
new file mode 100644
index 0000000000..f722c4ca37
@@ -0,0 +1,50 @@
+From 53796772ed735c1564863fc7ca8d902acb628167 Mon Sep 17 00:00:00 2001
+From: Ralf Gommers <[email protected]>
+Date: Thu, 22 Feb 2024 09:10:46 +0100
+Subject: [PATCH] MAINT: interpolate: define `F_INT` as `int` rather than
+ `npy_int32`
+
+This fixes an incompatible pointer issue that shows up as a warning in
+Windows CI jobs, and is reported to break the build with GCC 14 on
+Fedora 40 in gh-19993.
+
+Using `#define F_INT int` is done in several other submodules; this
+was the only instance of using `npy_int32`.
+
+Closes gh-19993
+
+Upstream: https://github.com/scipy/scipy/commit/fdf3b908eeb93203c1847c6fb4efd12e88c37ce5
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ scipy/interpolate/src/_fitpackmodule.c | 4 ++--
+ scipy/interpolate/src/fitpack.pyf      | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scipy/interpolate/src/_fitpackmodule.c b/scipy/interpolate/src/_fitpackmodule.c
+index 0e913d1c7e43..dc79b2b28833 100644
+--- a/scipy/interpolate/src/_fitpackmodule.c
++++ b/scipy/interpolate/src/_fitpackmodule.c
+@@ -28,8 +28,8 @@ static PyObject *fitpack_error;
+ 
+ #else
+ 
+-#define F_INT npy_int32
+-#define F_INT_NPY NPY_INT32
++#define F_INT int
++#define F_INT_NPY NPY_INT
+ #define F_INT_MAX NPY_MAX_INT32
+ #if NPY_BITSOF_SHORT == 32
+ #define F_INT_PYFMT   "h"
+diff --git a/scipy/interpolate/src/fitpack.pyf b/scipy/interpolate/src/fitpack.pyf
+index 08cb0c141c98..a9535a83f479 100644
+--- a/scipy/interpolate/src/fitpack.pyf
++++ b/scipy/interpolate/src/fitpack.pyf
+@@ -16,7 +16,7 @@ python module dfitpack ! in
+ #ifdef HAVE_ILP64
+ typedef npy_int64 F_INT;
+ #else
+-typedef npy_int32 F_INT;
++typedef int F_INT;
+ #endif
+ 
+ static double dmax(double* seq, F_INT len) {
Signature · 6 lines
2.56.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 2025.02.x 2/3] package/python-scipy: fix build with GCC14

In reply of:

Quoted 11 lines

When building python-scipy package with target GCC14 the following error would occure:

../scipy/interpolate/src/_fitpackmodule.c: In function ‘fitpack_bispev’:
../scipy/interpolate/src/_fitpackmodule.c:255:10: error: assignment to ‘npy_int32 *’ {aka ‘long int *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
255 | iwrk = (int *)(wrk + lwrk);
| ^

This has been fixed upstream with the patch [1] introduced in scipy version '1.13.0'. For more information see [2].

Quoted 6 lines

Backport this patch into the current 2025.02.x scipy version.

[1] https://github.com/scipy/scipy/commit/fdf3b908eeb93203c1847c6fb4efd12e88c37ce5
[2] https://github.com/scipy/scipy/pull/20135

Applied to 2025.02.x. Thanks

Quoted 51 lines
---
 ...e-F_INT-as-int-rather-than-npy_int32.patch | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/python-scipy/0003-interpolate-define-F_INT-as-int-rather-than-npy_int32.patch
package/python-scipy/0003-interpolate-define-F_INT-as-int-rather-than-npy_int32.patch new file +40 -0
new file mode 100644
index 0000000000..f722c4ca37
@@ -0,0 +1,50 @@
+From 53796772ed735c1564863fc7ca8d902acb628167 Mon Sep 17 00:00:00 2001
+From: Ralf Gommers <[email protected]>
+Date: Thu, 22 Feb 2024 09:10:46 +0100
+Subject: [PATCH] MAINT: interpolate: define `F_INT` as `int` rather than
+ `npy_int32`
+
+This fixes an incompatible pointer issue that shows up as a warning in
+Windows CI jobs, and is reported to break the build with GCC 14 on
+Fedora 40 in gh-19993.
+
+Using `#define F_INT int` is done in several other submodules; this
+was the only instance of using `npy_int32`.
+
+Closes gh-19993
+
+Upstream: https://github.com/scipy/scipy/commit/fdf3b908eeb93203c1847c6fb4efd12e88c37ce5
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ scipy/interpolate/src/_fitpackmodule.c | 4 ++--
+ scipy/interpolate/src/fitpack.pyf      | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/scipy/interpolate/src/_fitpackmodule.c b/scipy/interpolate/src/_fitpackmodule.c
+index 0e913d1c7e43..dc79b2b28833 100644
+--- a/scipy/interpolate/src/_fitpackmodule.c
++++ b/scipy/interpolate/src/_fitpackmodule.c
+@@ -28,8 +28,8 @@ static PyObject *fitpack_error;
+ 
+ #else
+ 
+-#define F_INT npy_int32
+-#define F_INT_NPY NPY_INT32
++#define F_INT int
++#define F_INT_NPY NPY_INT
+ #define F_INT_MAX NPY_MAX_INT32
+ #if NPY_BITSOF_SHORT == 32
+ #define F_INT_PYFMT   "h"
+diff --git a/scipy/interpolate/src/fitpack.pyf b/scipy/interpolate/src/fitpack.pyf
+index 08cb0c141c98..a9535a83f479 100644
+--- a/scipy/interpolate/src/fitpack.pyf

package/python-scipy/0003-interpolate-define-F_INT-as-int-rather-than-npy_int32.patch line 50

Quoted 10 lines
package/python-scipy/0003-interpolate-define-F_INT-as-int-rather-than-npy_int32.patch new file +10 -0
++++ b/scipy/interpolate/src/fitpack.pyf
+@@ -16,7 +16,7 @@ python module dfitpack ! in
+ #ifdef HAVE_ILP64
+ typedef npy_int64 F_INT;
+ #else
+-typedef npy_int32 F_INT;
++typedef int F_INT;
+ #endif
+ 
+ static double dmax(double* seq, F_INT len) {

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

PATCH 3/3 package/python-numpy: fix meson configuration with LAPACK

In reply to Thomas Perale via buildroot

Building numpy with the LAPACK package enabled (like when building python-scipy) would result in the following error during configuration:

```
numpy/meson.build:203:49: ERROR: Could not get pkg-config variable
and no default provided for <PkgConfigDependency lapack: True None>
```

This is reproducible with the following defconfig:

cat >.config <<EOF
BR2_arm=y
BR2_cortex_a7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_NUMPY=y
BR2_PACKAGE_LAPACK=y
EOF
make oldefconfig
make python-numpy

The variable that triggered that error got assigned a default value in upstream commit [1] which is available in python-numpy v2.0.0, which fix this error.

This commit backport the part of the upstream commit that assign the value by default.

[1] https://github.com/numpy/numpy/commit/34afbb97cc9915ad5976ddc869a539e897545722

---
 ...implement-BLAS-LAPACK-auto-detection.patch | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 package/python-numpy/0002-meson-implement-BLAS-LAPACK-auto-detection.patch
package/python-numpy/0002-meson-implement-BLAS-LAPACK-auto-detection.patch new file +77 -0
new file mode 100644
index 0000000000..f7822ef852
@@ -0,0 +1,77 @@
+From 34afbb97cc9915ad5976ddc869a539e897545722 Mon Sep 17 00:00:00 2001
+From: Ralf Gommers <[email protected]>
+Date: Tue, 10 Oct 2023 00:27:02 +0200
+Subject: [PATCH] ENH: meson: implement BLAS/LAPACK auto-detection and many CI jobs [wheel build]
+
+This reimplements the auto-detection and many of the switches that
+`numpy.distutils` offered. Beyond that, it implements several new
+features:
+
+- Auto-detect the symbol suffix for ILP64 OpenBLAS (can be none or
+  `64_`)
+- MKL ILP64 support, threading control, and use of the layered library
+  model for MKL >=2023.0
+- FlexiBLAS support (LP64 and ILP64)
+- Support for the upcoming standard in Reference LAPACK for `_64` ILP64
+  symbol suffix convention.
+- A test suite for BLAS/LAPACK libraries, covering:
+
+    - OpenBLAS: LP64, ILP64 detected via pkg-config and with a "system
+                dependency" (i.e., custom code inside Meson)
+    - MKL: LP64, ILP64 (layered) and LP64 (SDL)
+    - Accelerate: LP64, ILP64 on macOS >=13.3
+    - FlexiBLAS: LP64, ILP64 on Fedora
+    - ATLAS (LP64, via pkg-config only)
+    - BLIS (LP64, via pkg-config only)
+    - plain libblas/liblapack (Netlib, LP64 only)
+
+The list of libraries that is tried with the default 'auto' setting
+excludes a couple of libraries, because they're either no longer
+developed (ATLAS), not mature (libflame), or can't be tested and
+may be re-added later (ArmPL, ssl2). Those libraries can still be
+quite easily used via pkg-config.
+
+The new CI jobs are running by default right now. Once things settle
+down, the plan is to disable them by default and allow triggering
+them via a `[blas ci]` command in the commit message (just like for
+wheel builds).
+
+Docs will be included in a separate PR with the pending rewrite of
+all the build/install docs. For now, the CI jobs and the
+`meson_options.txt` file serve as guidance for how to use this.
+
+Note that the test suite contains a few hacks, because of packaging
+bugs for MKL on PyPI (broken .pc files) and BLIS (missing .pc file in
+Debian).
+
+Upstream: https://github.com/numpy/numpy/commit/34afbb97cc9915ad5976ddc869a539e897545722
+[thomas: backport subset of upstream commit.
+  Only the part that fix the 2025.02.x scipy version LAPACK detection.
+
+ Fixes:
+    numpy/meson.build:203:49: ERROR: Could not get pkg-config variable
+    and no default provided for <PkgConfigDependency lapack: True None>
+]
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ numpy/meson.build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/numpy/meson.build b/numpy/meson.build
+--- a/numpy/meson.build
++++ b/numpy/meson.build
+@@ -198,10 +198,10 @@
+   if dep.found()
+     conf_data.set(name + '_VERSION', dep.version())
+     conf_data.set(name + '_TYPE_NAME', dep.type_name())
+-    conf_data.set(name + '_INCLUDEDIR', dep.get_variable('includedir'))
+-    conf_data.set(name + '_LIBDIR', dep.get_variable('libdir'))
+-    conf_data.set(name + '_OPENBLAS_CONFIG', dep.get_variable('openblas_config'))
+-    conf_data.set(name + '_PCFILEDIR', dep.get_variable('pcfiledir'))
++    conf_data.set(name + '_INCLUDEDIR', dep.get_variable('includedir', default_value: 'unknown'))
++    conf_data.set(name + '_LIBDIR', dep.get_variable('libdir', default_value: 'unknown'))
++    conf_data.set(name + '_OPENBLAS_CONFIG', dep.get_variable('openblas_config', default_value: 'unknown'))
++    conf_data.set(name + '_PCFILEDIR', dep.get_variable('pcfiledir', default_value: 'unknown'))
+   endif
+ endforeach
+ 
Signature · 6 lines
2.56.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 2025.02.x 3/3] package/python-numpy: fix meson configuration with LAPACK

In reply of:

Quoted 26 lines

Building numpy with the LAPACK package enabled (like when building python-scipy) would result in the following error during configuration:

```
numpy/meson.build:203:49: ERROR: Could not get pkg-config variable
and no default provided for <PkgConfigDependency lapack: True None>
```

This is reproducible with the following defconfig:

cat >.config <<EOF
BR2_arm=y
BR2_cortex_a7=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_NUMPY=y
BR2_PACKAGE_LAPACK=y
EOF
make oldefconfig
make python-numpy

The variable that triggered that error got assigned a default value in upstream commit [1] which is available in python-numpy v2.0.0, which fix this error.

Quoted 7 lines

This commit backport the part of the upstream commit that assign the value by default.

[1] https://github.com/numpy/numpy/commit/34afbb97cc9915ad5976ddc869a539e897545722

Applied to 2025.02.x. Thanks

Quoted 78 lines
---
 ...implement-BLAS-LAPACK-auto-detection.patch | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 package/python-numpy/0002-meson-implement-BLAS-LAPACK-auto-detection.patch
package/python-numpy/0002-meson-implement-BLAS-LAPACK-auto-detection.patch new file +67 -0
new file mode 100644
index 0000000000..f7822ef852
@@ -0,0 +1,77 @@
+From 34afbb97cc9915ad5976ddc869a539e897545722 Mon Sep 17 00:00:00 2001
+From: Ralf Gommers <[email protected]>
+Date: Tue, 10 Oct 2023 00:27:02 +0200
+Subject: [PATCH] ENH: meson: implement BLAS/LAPACK auto-detection and many CI jobs [wheel build]
+
+This reimplements the auto-detection and many of the switches that
+`numpy.distutils` offered. Beyond that, it implements several new
+features:
+
+- Auto-detect the symbol suffix for ILP64 OpenBLAS (can be none or
+  `64_`)
+- MKL ILP64 support, threading control, and use of the layered library
+  model for MKL >=2023.0
+- FlexiBLAS support (LP64 and ILP64)
+- Support for the upcoming standard in Reference LAPACK for `_64` ILP64
+  symbol suffix convention.
+- A test suite for BLAS/LAPACK libraries, covering:
+
+    - OpenBLAS: LP64, ILP64 detected via pkg-config and with a "system
+                dependency" (i.e., custom code inside Meson)
+    - MKL: LP64, ILP64 (layered) and LP64 (SDL)
+    - Accelerate: LP64, ILP64 on macOS >=13.3
+    - FlexiBLAS: LP64, ILP64 on Fedora
+    - ATLAS (LP64, via pkg-config only)
+    - BLIS (LP64, via pkg-config only)
+    - plain libblas/liblapack (Netlib, LP64 only)
+
+The list of libraries that is tried with the default 'auto' setting
+excludes a couple of libraries, because they're either no longer
+developed (ATLAS), not mature (libflame), or can't be tested and
+may be re-added later (ArmPL, ssl2). Those libraries can still be
+quite easily used via pkg-config.
+
+The new CI jobs are running by default right now. Once things settle
+down, the plan is to disable them by default and allow triggering
+them via a `[blas ci]` command in the commit message (just like for
+wheel builds).
+
+Docs will be included in a separate PR with the pending rewrite of
+all the build/install docs. For now, the CI jobs and the
+`meson_options.txt` file serve as guidance for how to use this.
+
+Note that the test suite contains a few hacks, because of packaging
+bugs for MKL on PyPI (broken .pc files) and BLIS (missing .pc file in
+Debian).
+
+Upstream: https://github.com/numpy/numpy/commit/34afbb97cc9915ad5976ddc869a539e897545722
+[thomas: backport subset of upstream commit.
+  Only the part that fix the 2025.02.x scipy version LAPACK detection.
+
+ Fixes:
+    numpy/meson.build:203:49: ERROR: Could not get pkg-config variable
+    and no default provided for <PkgConfigDependency lapack: True None>
+]
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ numpy/meson.build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/numpy/meson.build b/numpy/meson.build
+--- a/numpy/meson.build
++++ b/numpy/meson.build
+@@ -198,10 +198,10 @@
+   if dep.found()
+     conf_data.set(name + '_VERSION', dep.version())
+     conf_data.set(name + '_TYPE_NAME', dep.type_name())
+-    conf_data.set(name + '_INCLUDEDIR', dep.get_variable('includedir'))

package/python-numpy/0002-meson-implement-BLAS-LAPACK-auto-detection.patch line 77

Quoted 10 lines
package/python-numpy/0002-meson-implement-BLAS-LAPACK-auto-detection.patch new file +10 -0
+-    conf_data.set(name + '_LIBDIR', dep.get_variable('libdir'))
+-    conf_data.set(name + '_OPENBLAS_CONFIG', dep.get_variable('openblas_config'))
+-    conf_data.set(name + '_PCFILEDIR', dep.get_variable('pcfiledir'))
++    conf_data.set(name + '_INCLUDEDIR', dep.get_variable('includedir', default_value: 'unknown'))
++    conf_data.set(name + '_LIBDIR', dep.get_variable('libdir', default_value: 'unknown'))
++    conf_data.set(name + '_OPENBLAS_CONFIG', dep.get_variable('openblas_config', default_value: 'unknown'))
++    conf_data.set(name + '_PCFILEDIR', dep.get_variable('pcfiledir', default_value: 'unknown'))
+   endif
+ endforeach
+ 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#5 lore raw
In reply to Thomas Perale via buildroot

In reply of:

Quoted 6 lines

Since Cython version 3.1.0 [1] and buildroot commit [2] python-scipy failed to build. This has been fixed upstream with [3].

This commit backports it to fix the build with the cython present in 2025.02.x.

Quoted 6 lines

[1] https://github.com/cython/cython/commit/ed7e95912b6ed7d20e190fbf1aecb9f2a997d479
[2] b536caaec0 package/python-cython: bump to version 3.1.2
[3] https://github.com/scipy/scipy/commit/217748476403a1e5726a921cedb674e7ffbc952e

Fixes b536caaec0 package/python-cython: bump to version 3.1.2

Applied to 2025.02.x. Thanks

Quoted 38 lines
---
 ...e-int-instead-of-long-in-cython-code.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch
package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch new file +27 -0
new file mode 100644
index 0000000000..6763c8cc5e
@@ -0,0 +1,37 @@
+From 217748476403a1e5726a921cedb674e7ffbc952e Mon Sep 17 00:00:00 2001
+From: Thomas A Caswell <[email protected]>
+Date: Thu, 21 Dec 2023 14:20:52 -0500
+Subject: [PATCH] MNT: use int instead of long in cython code (#19725)
+
+https://github.com/cython/cython/pull/5830 /
+d7e95912b6ed7d20e190fbf1aecb9f2a997d479 in cython removed
+long as a valid type in favor of int.
+
+Upstream: https://github.com/scipy/scipy/commit/217748476403a1e5726a921cedb674e7ffbc952e
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ scipy/_lib/_ccallback_c.pyx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/scipy/_lib/_ccallback_c.pyx b/scipy/_lib/_ccallback_c.pyx
+index 59ba74369267..6c493dac7c9c 100644
+--- a/scipy/_lib/_ccallback_c.pyx
++++ b/scipy/_lib/_ccallback_c.pyx
+@@ -58,7 +58,7 @@ def get_raw_capsule(func_obj, name_obj, context_obj):
+     elif context_obj is None:
+         context = NULL
+     else:
+-        context = PyLong_AsVoidPtr(long(context_obj))
++        context = PyLong_AsVoidPtr(int(context_obj))
+ 
+     if PyCapsule_CheckExact(func_obj):

package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch line 37

Quoted 10 lines
package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch new file +10 -0
+         capsule_name = PyCapsule_GetName(func_obj)
+@@ -70,7 +70,7 @@ def get_raw_capsule(func_obj, name_obj, context_obj):
+         if name == NULL:
+             name = capsule_name
+     else:
+-        func = PyLong_AsVoidPtr(long(func_obj))
++        func = PyLong_AsVoidPtr(int(func_obj))
+ 
+     if name == NULL:
+         name_copy = name

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot