Cython 3+ breakages and how to fix
Hello, good people. There is a number of packages in Factory that fail because of Cython 3+ The migration from older versions to the Cython3 is outlined here https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html I did an exercise so that people can inspire themselves in https://build.opensuse.org/package/view_file/openSUSE:Factory/python-efl/cyt... The fix is not complicated, but the noexcept keyword is not recognized by older versions of Cython, so one has to conditionalize the patch. This is just a heads-up for those that are wondering about the cryptic messages and trying to fix stuff. Cheers Fridrich
Am 1. September 2023 19:08:47 MESZ schrieb Fridrich Strba via openSUSE Factory <factory@lists.opensuse.org>:
Hello, good people.
There is a number of packages in Factory that fail because of Cython 3+
The migration from older versions to the Cython3 is outlined here https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html
I did an exercise so that people can inspire themselves in https://build.opensuse.org/package/view_file/openSUSE:Factory/python-efl/cyt...
The fix is not complicated, but the noexcept keyword is not recognized by older versions of Cython, so one has to conditionalize the patch.
This is just a heads-up for those that are wondering about the cryptic messages and trying to fix stuff.
Why not just use python-Cython0 as a dependency? Regards Eric
Am 02.09.23 um 09:37 schrieb Fridrich Strba via openSUSE Factory:
Why not just use python-Cython0 as a dependency?
Also a solution, yes.
The slightly better dependency is python-Cython < 3 usually as BuildRequires: %{python_module Cython >= 0.29 with %python-Cython < 3} That way you don't hardcode the Tumbleweed naming scheme but allow the python3-Cython 0.29 package for 15.X. - Ben
On 01/09/2023 22:25, Eric Schirra wrote:
Why not just use python-Cython0 as a dependency?
Regards Eric
Actually, now I remember why. python39 and python310 were just fine, but then in python311, I was getting this kind of things: [ 458s] efl/utils/deprecated.c: In function ‘__Pyx_AddTraceback’: [ 458s] efl/utils/deprecated.c:461:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’} [ 458s] 461 | #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) [ 458s] | ^~ [ 458s] efl/utils/deprecated.c:4806:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’ [ 458s] 4806 | __Pyx_PyFrame_SetLineNumber(py_frame, py_line); [ 458s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 458s] error: command '/usr/bin/gcc' failed with exit code 1 [ 458s] error: Bad exit status from /var/tmp/rpm-tmp.y06LDh (%build) So, decided to cythonize with 3 and after the patch it cythonized correctly and compiled with the python39, python310 and python311 alike. Cheers Fridrich
participants (3)
-
Ben Greiner
-
Eric Schirra
-
Fridrich Strba