diff --git a/pyproject.toml b/pyproject.toml index 2bf5ec80..3cf9a28d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["setuptools", "wheel", "Cython"] +requires = ["setuptools", "wheel", "Cython~=3.0a"] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 548b19f7..da4a66fa 100644 --- a/setup.py +++ b/setup.py @@ -81,7 +81,11 @@ with_cython = True try: from Cython.Distutils.extension import Extension as _Extension - from Cython.Distutils import build_ext as _build_ext + + try: + from Cython.Distutils.old_build_ext import old_build_ext as _build_ext + except ImportError: + from Cython.Distutils import build_ext as _build_ext with_cython = True except ImportError: if with_cython: