diff --git a/cython-0.29.28-missing-header.patch b/cython-0.29.28-missing-header.patch new file mode 100644 index 0000000..76a3bbf --- /dev/null +++ b/cython-0.29.28-missing-header.patch @@ -0,0 +1,11 @@ +diff -up cython-0.29.28/Cython/Compiler/ModuleNode.py.omv~ cython-0.29.28/Cython/Compiler/ModuleNode.py +--- cython-0.29.28/Cython/Compiler/ModuleNode.py.omv~ 2022-03-19 18:48:56.463782075 +0100 ++++ cython-0.29.28/Cython/Compiler/ModuleNode.py 2022-03-19 18:57:31.325762579 +0100 +@@ -642,6 +642,7 @@ class ModuleNode(Nodes.Node, Nodes.Block + for inc in sorted(env.c_includes.values(), key=IncludeCode.sortkey): + if inc.location == inc.INITIAL: + inc.write(code) ++ code.putln('#include "internal/pycore_frame.h"') # Needed for PyFrameObject in Python 3.11a6, PyFrameObject is used heavily by cython + code.putln("#ifndef Py_PYTHON_H") + code.putln(" #error Python headers needed to compile C extensions, " + "please install development version of Python.") diff --git a/python-cython.spec b/python-cython.spec index c20ae1c..a5e7164 100644 --- a/python-cython.spec +++ b/python-cython.spec @@ -1,7 +1,7 @@ # Python module not linking to libpython %global _disable_ld_no_undefined 1 -%bcond_without python2 +%bcond_with python2 %bcond_with check %define tarname cython %define py2dir python2 @@ -17,6 +17,7 @@ Group: Development/Python Url: http://www.cython.org Source0: https://github.com/cython/cython/archive/%{version}.tar.gz?/cython-%{version}.tar.gz Source1: %{name}.rpmlintrc +Patch0: cython-0.29.28-missing-header.patch BuildRequires: dos2unix %if %{with check} BuildRequires: gdb @@ -50,6 +51,7 @@ edge functionality and optimizations. %{py3_platsitedir}/Cython-%{version}-*.egg-info %{py3_platsitedir}/cython* %{py3_platsitedir}/pyximport +%{py3_platsitedir}/__pycache__/ #--------------------------------------------------------------------