File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- cython == 3.0.11
1+ cython == 3.1.0
22setuptools
33pytest
44pytest-asyncio
Original file line number Diff line number Diff line change 77from setuptools import Extension , setup
88
99debug = os .environ .get ("DEPENDENCY_INJECTOR_DEBUG_MODE" ) == "1"
10+ limited_api = os .environ .get ("DEPENDENCY_INJECTOR_LIMITED_API" ) == "1"
1011defined_macros = []
12+ options = {}
1113compiler_directives = {
1214 "language_level" : 3 ,
1315 "profile" : debug ,
1719
1820# Adding debug options:
1921if debug :
22+ limited_api = False # line tracing is not part of the Limited API
2023 defined_macros .extend (
2124 [
2225 ("CYTHON_TRACE" , "1" ),
2528 ]
2629 )
2730
31+ if limited_api :
32+ options .setdefault ("bdist_wheel" , {})
33+ options ["bdist_wheel" ]["py_limited_api" ] = "cp38"
34+ defined_macros .append (("Py_LIMITED_API" , 0x03080000 ))
2835
2936setup (
37+ options = options ,
3038 ext_modules = cythonize (
3139 [
3240 Extension (
3341 "*" ,
3442 ["src/**/*.pyx" ],
3543 define_macros = defined_macros ,
44+ py_limited_api = limited_api ,
3645 ),
3746 ],
3847 annotate = debug ,
You can’t perform that action at this time.
0 commit comments