mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-23 05:56:19 +03:00
Limit ABI3 builds to CPython only
This commit is contained in:
parent
29b9c09e64
commit
6629b9eb8a
8
setup.py
8
setup.py
|
@ -1,13 +1,17 @@
|
||||||
"""`Dependency injector` setup script."""
|
"""`Dependency injector` setup script."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from Cython.Build import cythonize
|
from Cython.Build import cythonize
|
||||||
from Cython.Compiler import Options
|
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"
|
limited_api = (
|
||||||
|
os.environ.get("DEPENDENCY_INJECTOR_LIMITED_API") == "1"
|
||||||
|
and sys.implementation.name == "cpython"
|
||||||
|
)
|
||||||
defined_macros = []
|
defined_macros = []
|
||||||
options = {}
|
options = {}
|
||||||
compiler_directives = {
|
compiler_directives = {
|
||||||
|
@ -31,7 +35,7 @@ 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"] = "cp38"
|
||||||
defined_macros.append(("Py_LIMITED_API", 0x03080000))
|
defined_macros.append(("Py_LIMITED_API", "0x03080000"))
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
options=options,
|
options=options,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user