use and require cython3

This commit is contained in:
Thomas Waldmann 2024-01-02 19:30:14 +01:00
parent 1432f547fe
commit 5ca4703a47
No known key found for this signature in database
GPG Key ID: 243ACFA951F78E01
2 changed files with 3 additions and 1 deletions

View File

@ -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]

View File

@ -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