-
Notifications
You must be signed in to change notification settings - Fork 199
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·29 lines (26 loc) · 841 Bytes
/
setup.py
File metadata and controls
executable file
·29 lines (26 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python
from setuptools import Extension, setup
import sysconfig
if __name__ == "__main__":
if sysconfig.get_config_var("Py_GIL_DISABLED") == 1:
# Cannot build a limited API extension module for free-threaded builds
setup(
ext_modules=[
Extension(
"asv._rangemedian",
sources=["asv/_rangemedian.cpp"],
)
],
)
else:
setup(
ext_modules=[
Extension(
"asv._rangemedian",
sources=["asv/_rangemedian.cpp"],
define_macros=[("Py_LIMITED_API", "0x03060000")],
py_limited_api=True,
)
],
options={"bdist_wheel": {"py_limited_api": "cp36"}},
)