File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
"""`Dependency injector` setup script."""
2
2
3
3
import os
4
+ import sys
4
5
5
6
from Cython .Build import cythonize
6
7
from Cython .Compiler import Options
7
8
from setuptools import Extension , setup
8
9
9
10
debug = os .environ .get ("DEPENDENCY_INJECTOR_DEBUG_MODE" ) == "1"
10
- limited_api = os .environ .get ("DEPENDENCY_INJECTOR_LIMITED_API" ) == "1"
11
+ limited_api = (
12
+ os .environ .get ("DEPENDENCY_INJECTOR_LIMITED_API" ) == "1"
13
+ and sys .implementation .name == "cpython"
14
+ )
11
15
defined_macros = []
12
16
options = {}
13
17
compiler_directives = {
31
35
if limited_api :
32
36
options .setdefault ("bdist_wheel" , {})
33
37
options ["bdist_wheel" ]["py_limited_api" ] = "cp38"
34
- defined_macros .append (("Py_LIMITED_API" , 0x03080000 ))
38
+ defined_macros .append (("Py_LIMITED_API" , " 0x03080000" ))
35
39
36
40
setup (
37
41
options = options ,
You can’t perform that action at this time.
0 commit comments