python-yaml: fix build with Cython 3

Signed-off-by: krant <aleksey.vasilenko@gmail.com>
This commit is contained in:
krant
2024-02-20 13:49:43 +02:00
committed by Rosen Penev
parent a7b5bfbfb7
commit bd84d97be6
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,3 @@
[build-system]
-requires = ["setuptools", "wheel", "Cython<3.0"]
+requires = ["setuptools", "wheel", "Cython"]
build-backend = "setuptools.build_meta"
--- a/setup.py
+++ b/setup.py
@@ -82,7 +82,7 @@ if 'sdist' in sys.argv or os.environ.get
with_cython = True
try:
from Cython.Distutils.extension import Extension as _Extension
- from Cython.Distutils import build_ext as _build_ext
+ from Cython.Distutils.old_build_ext import old_build_ext as _build_ext
with_cython = True
except ImportError:
if with_cython: