Browse Source

use and require cython3

Thomas Waldmann 1 year ago
parent
commit
5ca4703a47
2 changed files with 3 additions and 1 deletions
  1. 1 1
      pyproject.toml
  2. 2 0
      setup.py

+ 1 - 1
pyproject.toml

@@ -66,7 +66,7 @@ where = ["src"]
 "*" = ["*.c", "*.h", "*.pyx"]
 
 [build-system]
-requires = ["setuptools", "wheel", "pkgconfig", "Cython", "setuptools_scm[toml]>=6.2"]
+requires = ["setuptools", "wheel", "pkgconfig", "Cython>=3", "setuptools_scm[toml]>=6.2"]
 build-backend = "setuptools.build_meta"
 
 [tool.setuptools_scm]

+ 2 - 0
setup.py

@@ -239,6 +239,8 @@ if not on_rtd:
     )
 
     if cythonize and cythonizing:
+        # 3str is the default in Cython3 and we do not support older Cython releases.
+        # we only set this to avoid the related FutureWarning from Cython3.
         cython_opts = dict(compiler_directives={"language_level": "3str"})
         if not is_win32:
             # compile .pyx extensions to .c in parallel, does not work on windows