From 7cb8cd10402e117aed984554a992813f44caae24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 13 Oct 2023 12:15:25 +0200 Subject: [PATCH 1/8] Update to 3.0.3 --- .gitignore | 1 + Cython.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 75f07e2..7740595 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ Cython-0.12.1.tar.gz /Cython-3.0.0rc2.tar.gz /Cython-3.0.0.tar.gz /Cython-3.0.2.tar.gz +/Cython-3.0.3.tar.gz diff --git a/Cython.spec b/Cython.spec index 4ad12eb..9b54489 100644 --- a/Cython.spec +++ b/Cython.spec @@ -5,7 +5,7 @@ %bcond cython_compile 1 Name: Cython -Version: 3.0.2 +Version: 3.0.3 Release: 1%{?dist} Summary: Language for writing Python extension modules @@ -112,6 +112,10 @@ Provides: bundled(python3dist(tempita)) %changelog +* Fri Oct 13 2023 Miro Hrončok - 3.0.3-1 +- Update to 3.0.3 +- Fixes: rhbz#2242429 + * Fri Sep 01 2023 Miro Hrončok - 3.0.2-1 - Update to 3.0.2 - Fixes: rhbz#2235027 diff --git a/sources b/sources index 8414d01..996dedd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Cython-3.0.2.tar.gz) = f55be138efdca6ca61bd39c6f2fab736244328a170a6f6c9bda87036e022c846930b209e9e9101fad889cb179d6e60034ba6f299f14b3056536d46235b438eb7 +SHA512 (Cython-3.0.3.tar.gz) = c27c16abaf0122ad61e0eeb92aa80a33fc491332b8ebec209cd1810d2b0e3bf14fe1e81838803b86f407520a6d6f7ab8b84d97e495e7d91fd6f7702a46980caa From 7b55261c3d438908d3b957121e4a1fa7db614533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 13 Oct 2023 14:59:48 +0200 Subject: [PATCH 2/8] Add upstream link to the comment about skipped pstats profile tests --- Cython.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/Cython.spec b/Cython.spec index 9b54489..c0c477b 100644 --- a/Cython.spec +++ b/Cython.spec @@ -90,6 +90,7 @@ Provides: bundled(python3dist(tempita)) %if %{with tests} %check # run.pstats_profile_test* fails on Python 3.12 +# https://github.com/cython/cython/issues/5470 %{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \ --exclude 'run.pstats_profile_test*' \ %ifarch %{ix86} From 2323ac7d60b0c2b83290c9aa9823ee7fd531cc03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 18 Oct 2023 00:29:27 +0200 Subject: [PATCH 3/8] Exclude gil_in_var on i686 --- Cython.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cython.spec b/Cython.spec index c0c477b..fdf8180 100644 --- a/Cython.spec +++ b/Cython.spec @@ -91,10 +91,15 @@ Provides: bundled(python3dist(tempita)) %check # run.pstats_profile_test* fails on Python 3.12 # https://github.com/cython/cython/issues/5470 +# run.parallel fails on i686 +# https://github.com/cython/cython/issues/2807 +# gil_in_var fails on i686 +# https://github.com/cython/cython/issues/5768 %{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \ --exclude 'run.pstats_profile_test*' \ %ifarch %{ix86} - --exclude run.parallel # https://github.com/cython/cython/issues/2807 + --exclude run.parallel \ + --exclude gil_in_var \ %endif %endif From 816bc6d12faaab23f67272b3c78eea3a4bef6e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 13 Oct 2023 14:58:38 +0200 Subject: [PATCH 4/8] Add more optional test dependencies to run more tests --- Cython.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cython.spec b/Cython.spec index fdf8180..f8a8a11 100644 --- a/Cython.spec +++ b/Cython.spec @@ -18,11 +18,15 @@ BuildRequires: python3-setuptools %if %{with tests} BuildRequires: gcc-c++ +BuildRequires: gdb +# optionally uses Python's test.support for some test +BuildRequires: python3-test BuildRequires: python3-numpy BuildRequires: python3-pythran %if %{undefined rhel} # We don't want to pull in ipython to RHEL just to run more tests. -BuildRequires: python3-ipython +# The tests use IPython.testing.globalipapp +BuildRequires: python3-ipython+test # The tests requiring jedi are optional and skipped when jedi is not installed. # Note that the jedi tests were forcefully disabled a long time ago, # in https://github.com/cython/cython/issues/1845 far, far away. From b652c0db5c3f79206f2f54675355d6cc38517395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 18 Oct 2023 20:12:46 +0200 Subject: [PATCH 5/8] Update to 3.0.4 --- .gitignore | 1 + Cython.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7740595..64d6545 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ Cython-0.12.1.tar.gz /Cython-3.0.0.tar.gz /Cython-3.0.2.tar.gz /Cython-3.0.3.tar.gz +/Cython-3.0.4.tar.gz diff --git a/Cython.spec b/Cython.spec index f8a8a11..257fdb9 100644 --- a/Cython.spec +++ b/Cython.spec @@ -5,7 +5,7 @@ %bcond cython_compile 1 Name: Cython -Version: 3.0.3 +Version: 3.0.4 Release: 1%{?dist} Summary: Language for writing Python extension modules @@ -122,6 +122,10 @@ Provides: bundled(python3dist(tempita)) %changelog +* Wed Oct 18 2023 Miro Hrončok - 3.0.4-1 +- Update to 3.0.4 +- Fixes: rhbz#2244865 + * Fri Oct 13 2023 Miro Hrončok - 3.0.3-1 - Update to 3.0.3 - Fixes: rhbz#2242429 diff --git a/sources b/sources index 996dedd..f120c14 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Cython-3.0.3.tar.gz) = c27c16abaf0122ad61e0eeb92aa80a33fc491332b8ebec209cd1810d2b0e3bf14fe1e81838803b86f407520a6d6f7ab8b84d97e495e7d91fd6f7702a46980caa +SHA512 (Cython-3.0.4.tar.gz) = bc87e38f9c188a5311f75f49ba4b9ec1ee0af00ff9ed655ca69972891f8b0801025265f8cad4521670088275c7da3d6136aeda7ebb6a33554f64cc7aef362c73 From 86fdd7be24103f07a0dacc747593226720cb8bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 31 Oct 2023 17:06:56 +0100 Subject: [PATCH 6/8] Update to 3.0.5 --- .gitignore | 1 + Cython.spec | 8 ++++---- sources | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 64d6545..9e96b0a 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ Cython-0.12.1.tar.gz /Cython-3.0.2.tar.gz /Cython-3.0.3.tar.gz /Cython-3.0.4.tar.gz +/Cython-3.0.5.tar.gz diff --git a/Cython.spec b/Cython.spec index 257fdb9..427cb37 100644 --- a/Cython.spec +++ b/Cython.spec @@ -5,7 +5,7 @@ %bcond cython_compile 1 Name: Cython -Version: 3.0.4 +Version: 3.0.5 Release: 1%{?dist} Summary: Language for writing Python extension modules @@ -97,13 +97,10 @@ Provides: bundled(python3dist(tempita)) # https://github.com/cython/cython/issues/5470 # run.parallel fails on i686 # https://github.com/cython/cython/issues/2807 -# gil_in_var fails on i686 -# https://github.com/cython/cython/issues/5768 %{python3} runtests.py -vv --no-pyregr %{?_smp_mflags} \ --exclude 'run.pstats_profile_test*' \ %ifarch %{ix86} --exclude run.parallel \ - --exclude gil_in_var \ %endif %endif @@ -122,6 +119,9 @@ Provides: bundled(python3dist(tempita)) %changelog +* Tue Oct 31 2023 Miro Hrončok - 3.0.5-1 +- Update to 3.0.5 + * Wed Oct 18 2023 Miro Hrončok - 3.0.4-1 - Update to 3.0.4 - Fixes: rhbz#2244865 diff --git a/sources b/sources index f120c14..2b43564 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Cython-3.0.4.tar.gz) = bc87e38f9c188a5311f75f49ba4b9ec1ee0af00ff9ed655ca69972891f8b0801025265f8cad4521670088275c7da3d6136aeda7ebb6a33554f64cc7aef362c73 +SHA512 (Cython-3.0.5.tar.gz) = 585d3fe810ace55278fcc6ea4508b3b5259320f92998cd688da787cd5f88ac5fc2467025f20da6d968969eb3296ae9c517136d24a4dbb475441271227968f6be From 5907573e25197b02e65c39c373b52ff8b12b756d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 13 Oct 2023 14:56:47 +0200 Subject: [PATCH 7/8] Convert to pyproject-rpm-macros --- Cython.spec | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Cython.spec b/Cython.spec index 427cb37..9a0a9f9 100644 --- a/Cython.spec +++ b/Cython.spec @@ -14,13 +14,14 @@ URL: http://www.cython.org Source: https://github.com/cython/cython/archive/%{version}/Cython-%{version}.tar.gz BuildRequires: python3-devel -BuildRequires: python3-setuptools %if %{with tests} BuildRequires: gcc-c++ BuildRequires: gdb # optionally uses Python's test.support for some test BuildRequires: python3-test +# the Python tests requirements are curated manually +# the test-requirements*.txt files mix in coverage and optional deps BuildRequires: python3-numpy BuildRequires: python3-pythran %if %{undefined rhel} @@ -38,10 +39,8 @@ BuildRequires: python3-jedi %if %{with cython_compile} BuildRequires: gcc -%global python3_site %{python3_sitearch} %else BuildArch: noarch -%global python3_site %{python3_sitelib} %endif %global _description %{expand: @@ -83,12 +82,17 @@ Provides: bundled(python3dist(tempita)) %autosetup -n cython-%{version} -p1 +%generate_buildrequires +%pyproject_buildrequires + + %build -%py3_build -- %{!?with_cython_compile:--no-cython-compile} +%pyproject_wheel %{!?with_cython_compile:-C--global-option=--no-cython-compile} %install -%py3_install -- %{!?with_cython_compile:--no-cython-compile} +%pyproject_install +%pyproject_save_files Cython cython pyximport %if %{with tests} @@ -106,16 +110,11 @@ Provides: bundled(python3dist(tempita)) %endif -%files -n python3-cython -%license LICENSE.txt +%files -n python3-cython -f %{pyproject_files} %doc *.txt Demos Doc Tools %{_bindir}/cython %{_bindir}/cygdb %{_bindir}/cythonize -%{python3_site}/Cython-*.egg-info/ -%{python3_site}/Cython/ -%{python3_site}/pyximport/ -%pycached %{python3_site}/cython.py %changelog From 704bbe1117e7905f435ccb9e37404b2e9a5dc83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 6 Nov 2023 11:37:34 +0100 Subject: [PATCH 8/8] Fix C++17 error: standard attributes in middle of decl-specifiers (CYTHON_UNUSED) This is only relevant on Python 3.13+ Fixes (part of) https://bugzilla.redhat.com/2247486 --- 5791.patch | 35 +++++++++++++++++++++++++++++++++++ Cython.spec | 4 ++++ 2 files changed, 39 insertions(+) create mode 100644 5791.patch diff --git a/5791.patch b/5791.patch new file mode 100644 index 0000000..6b6286b --- /dev/null +++ b/5791.patch @@ -0,0 +1,35 @@ +From add379d9df149149e3718bd8f71945b7d02fcf4e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Wed, 1 Nov 2023 21:32:40 +0100 +Subject: [PATCH] Fix C++17 error: standard attributes in middle of + decl-specifiers (CYTHON_UNUSED) + +This is only relevant on Python 3.13+ + +Fixes https://github.com/cython/cython/issues/5790 +--- + Cython/Utility/FunctionArguments.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Cython/Utility/FunctionArguments.c b/Cython/Utility/FunctionArguments.c +index 5050a094a88..0dc89c638ab 100644 +--- a/Cython/Utility/FunctionArguments.c ++++ b/Cython/Utility/FunctionArguments.c +@@ -505,7 +505,7 @@ static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { + #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) + static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +- static CYTHON_UNUSED PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);/*proto*/ ++ CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);/*proto*/ + #else + #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) + #endif +@@ -563,7 +563,7 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO + } + + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 +-static CYTHON_UNUSED PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { ++CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { + Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); + PyObject *dict; + diff --git a/Cython.spec b/Cython.spec index 9a0a9f9..e8ad94e 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 +# Fix C++17 error: standard attributes in middle of decl-specifiers (CYTHON_UNUSED) +# This is only relevant on Python 3.13+ +Patch: https://github.com/cython/cython/pull/5791.patch + BuildRequires: python3-devel %if %{with tests}