mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-10-10 13:57:02 +03:00
Build ABI3 wheels only for Python>=3.10
This commit is contained in:
parent
8c2a32213a
commit
891f8b4190
7
setup.py
7
setup.py
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import sysconfig
|
||||||
|
|
||||||
from Cython.Build import cythonize
|
from Cython.Build import cythonize
|
||||||
from Cython.Compiler import Options
|
from Cython.Compiler import Options
|
||||||
|
@ -11,6 +12,8 @@ debug = os.environ.get("DEPENDENCY_INJECTOR_DEBUG_MODE") == "1"
|
||||||
limited_api = (
|
limited_api = (
|
||||||
os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1"
|
os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1"
|
||||||
and sys.implementation.name == "cpython"
|
and sys.implementation.name == "cpython"
|
||||||
|
and sys.version_info >= (3, 10)
|
||||||
|
and not sysconfig.get_config_var("Py_GIL_DISABLED")
|
||||||
)
|
)
|
||||||
defined_macros = []
|
defined_macros = []
|
||||||
options = {}
|
options = {}
|
||||||
|
@ -34,8 +37,8 @@ if debug:
|
||||||
|
|
||||||
if limited_api:
|
if limited_api:
|
||||||
options.setdefault("bdist_wheel", {})
|
options.setdefault("bdist_wheel", {})
|
||||||
options["bdist_wheel"]["py_limited_api"] = "cp38"
|
options["bdist_wheel"]["py_limited_api"] = "cp310"
|
||||||
defined_macros.append(("Py_LIMITED_API", "0x03080000"))
|
defined_macros.append(("Py_LIMITED_API", "0x030A0000"))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
options=options,
|
options=options,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user