mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-23 05:56:19 +03:00
Update Cython to v3.1 (#887)
This commit is contained in:
parent
dbf86e4eb4
commit
8bf9ed04c8
|
@ -1,4 +1,4 @@
|
||||||
cython==3.0.11
|
cython==3.1.0
|
||||||
setuptools
|
setuptools
|
||||||
pytest
|
pytest
|
||||||
pytest-asyncio
|
pytest-asyncio
|
||||||
|
|
9
setup.py
9
setup.py
|
@ -7,7 +7,9 @@ from Cython.Compiler import Options
|
||||||
from setuptools import Extension, setup
|
from setuptools import Extension, setup
|
||||||
|
|
||||||
debug = os.environ.get("DEPENDENCY_INJECTOR_DEBUG_MODE") == "1"
|
debug = os.environ.get("DEPENDENCY_INJECTOR_DEBUG_MODE") == "1"
|
||||||
|
limited_api = os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1"
|
||||||
defined_macros = []
|
defined_macros = []
|
||||||
|
options = {}
|
||||||
compiler_directives = {
|
compiler_directives = {
|
||||||
"language_level": 3,
|
"language_level": 3,
|
||||||
"profile": debug,
|
"profile": debug,
|
||||||
|
@ -17,6 +19,7 @@ Options.annotate = debug
|
||||||
|
|
||||||
# Adding debug options:
|
# Adding debug options:
|
||||||
if debug:
|
if debug:
|
||||||
|
limited_api = False # line tracing is not part of the Limited API
|
||||||
defined_macros.extend(
|
defined_macros.extend(
|
||||||
[
|
[
|
||||||
("CYTHON_TRACE", "1"),
|
("CYTHON_TRACE", "1"),
|
||||||
|
@ -25,14 +28,20 @@ if debug:
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if limited_api:
|
||||||
|
options.setdefault("bdist_wheel", {})
|
||||||
|
options["bdist_wheel"]["py_limited_api"] = "cp38"
|
||||||
|
defined_macros.append(("Py_LIMITED_API", 0x03080000))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
|
options=options,
|
||||||
ext_modules=cythonize(
|
ext_modules=cythonize(
|
||||||
[
|
[
|
||||||
Extension(
|
Extension(
|
||||||
"*",
|
"*",
|
||||||
["src/**/*.pyx"],
|
["src/**/*.pyx"],
|
||||||
define_macros=defined_macros,
|
define_macros=defined_macros,
|
||||||
|
py_limited_api=limited_api,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
annotate=debug,
|
annotate=debug,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user