Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 2025.02.x 1/3] package/python-scipy: fix build with cython >=3.1.0
@ 2026-10-20  6:44 Thomas Perale via buildroot
  2026-10-20  6:44 ` [Buildroot] [PATCH 2025.02.x 2/3] package/python-scipy: fix build with GCC14 Thomas Perale via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Perale via buildroot @ 2026-10-20  6:44 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Guillaume William Brs, Jagan Teki

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
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
 ...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

diff --git a/package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch b/package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch
new file mode 100644
index 0000000000..6763c8cc5e
--- /dev/null
+++ b/package/python-scipy/0002-use-int-instead-of-long-in-cython-code.patch
@@ -0,0 +1,37 @@
+From 217748476403a1e5726a921cedb674e7ffbc952e Mon Sep 17 00:00:00 2001
+From: Thomas A Caswell <tcaswell@gmail.com>
+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 <thomas.perale@mind.be>
+---
+ 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
-- 
2.56.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-23 13:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20  6:44 [Buildroot] [PATCH 2025.02.x 1/3] package/python-scipy: fix build with cython >=3.1.0 Thomas Perale via buildroot
2026-10-20  6:44 ` [Buildroot] [PATCH 2025.02.x 2/3] package/python-scipy: fix build with GCC14 Thomas Perale via buildroot
2026-10-23 13:21   ` Raphaël Mélotte via buildroot
2026-10-20  6:44 ` [Buildroot] [PATCH 2025.02.x 3/3] package/python-numpy: fix meson configuration with LAPACK Thomas Perale via buildroot
2026-10-23 13:21   ` Raphaël Mélotte via buildroot
2026-10-23 13:21 ` [Buildroot] [PATCH 2025.02.x 1/3] package/python-scipy: fix build with cython >=3.1.0 Raphaël Mélotte via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox