File tree 2 files changed +10
-1
lines changed
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
2
2
setuptools
3
3
pytest
4
4
pytest-asyncio
Original file line number Diff line number Diff line change 7
7
from setuptools import Extension , setup
8
8
9
9
debug = os .environ .get ("DEPENDENCY_INJECTOR_DEBUG_MODE" ) == "1"
10
+ limited_api = os .environ .get ("DEPENDENCY_INJECTOR_LIMITED_API" ) == "1"
10
11
defined_macros = []
12
+ options = {}
11
13
compiler_directives = {
12
14
"language_level" : 3 ,
13
15
"profile" : debug ,
17
19
18
20
# Adding debug options:
19
21
if debug :
22
+ limited_api = False # line tracing is not part of the Limited API
20
23
defined_macros .extend (
21
24
[
22
25
("CYTHON_TRACE" , "1" ),
25
28
]
26
29
)
27
30
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 ))
28
35
29
36
setup (
37
+ options = options ,
30
38
ext_modules = cythonize (
31
39
[
32
40
Extension (
33
41
"*" ,
34
42
["src/**/*.pyx" ],
35
43
define_macros = defined_macros ,
44
+ py_limited_api = limited_api ,
36
45
),
37
46
],
38
47
annotate = debug ,
You can’t perform that action at this time.
0 commit comments