From: Thomas Perale via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: James Hilliard <james.hilliard1@gmail.com>,
Guillaume William Brs <guillaume.bressaix@gmail.com>,
Jagan Teki <jagan@amarulasolutions.com>
Subject: [Buildroot] [PATCH 2025.02.x 1/3] package/python-scipy: fix build with cython >=3.1.0
Date: Tue, 20 Oct 2026 08:44:07 +0200 [thread overview]
Message-ID: <20261020064409.179420-1-thomas.perale@mind.be> (raw)
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
next reply other threads:[~2026-10-20 6:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 6:44 Thomas Perale via buildroot [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261020064409.179420-1-thomas.perale@mind.be \
--to=buildroot@buildroot.org \
--cc=guillaume.bressaix@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=james.hilliard1@gmail.com \
--cc=thomas.perale@mind.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox