diff --git a/852286242ee46cc16f0a6efef7eb40a5ab3c57d5.patch b/852286242ee46cc16f0a6efef7eb40a5ab3c57d5.patch new file mode 100644 index 0000000..5442c4c --- /dev/null +++ b/852286242ee46cc16f0a6efef7eb40a5ab3c57d5.patch @@ -0,0 +1,24 @@ +From 852286242ee46cc16f0a6efef7eb40a5ab3c57d5 Mon Sep 17 00:00:00 2001 +From: da-woods +Date: Wed, 25 Dec 2024 12:12:11 +0000 +Subject: [PATCH] Backport ufunc Numpy2 fix + +--- + tests/run/ufunc.pyx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/run/ufunc.pyx b/tests/run/ufunc.pyx +index f489a07d5e4..b1895ee7903 100644 +--- a/tests/run/ufunc.pyx ++++ b/tests/run/ufunc.pyx +@@ -124,8 +124,8 @@ def test_plus_one_twice(): + Test a function returning a fused ctuple + >>> plus_one_twice(int_arr_1d) # doctest: +ELLIPSIS + (array([ 1, 5, 9, 13, 17]...), array([ 1, 5, 9, 13, 17]...)) +- >>> plus_one_twice(1.j) +- ((1+1j), (1+1j)) ++ >>> print(*plus_one_twice(1.j)) ++ (1+1j) (1+1j) + + 2D variant skipped because it's hard to sensible doctest + """ diff --git a/Cython.spec b/Cython.spec index 5f252de..166d3e8 100644 --- a/Cython.spec +++ b/Cython.spec @@ -13,6 +13,10 @@ License: Apache-2.0 URL: http://www.cython.org Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz +# Backport patch for NumPy 2.x +# https://github.com/cython/cython/issues/6581 +Patch: https://github.com/cython/cython/commit/852286242ee46cc16f0a6efef7eb40a5ab3c57d5.patch + BuildRequires: python3-devel %if %{with tests}