Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
41 lines (33 loc) · 1.09 KB
/
Copy pathsetup.py
File metadata and controls
41 lines (33 loc) · 1.09 KB
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
30
31
32
33
34
35
36
37
38
39
40
"""Setup for skytools module.
"""
fromtypingimportTuple
fromsetuptoolsimportExtension, setup, __version__asst_version
importsysconfig
try:
fromsetuptools.command.bdist_wheelimportbdist_wheel
classbdist_wheel_abi3(bdist_wheel):
defget_tag(self) ->Tuple[str, str, str]:
python, abi, plat=super().get_tag()
ifpython.startswith("cp") andLIMITED_API:
returnCP_VER, "abi3", plat
returnpython, abi, plat
cmdclass= {"bdist_wheel": bdist_wheel_abi3}
exceptImportError:
cmdclass= {}
ifsysconfig.get_config_var("Py_GIL_DISABLED"):
CP_VER='unused'
MACROS= []
LIMITED_API=False
else:
CP_VER="cp310"
MACROS= [('Py_LIMITED_API', '0x030a0000')]
LIMITED_API=True
setup(
cmdclass=cmdclass,
ext_modules= [
Extension("skytools._cquoting", ["modules/cquoting.c"],
define_macros=MACROS, py_limited_api=LIMITED_API),
Extension("skytools._chashtext", ["modules/hashtext.c"],
define_macros=MACROS, py_limited_api=LIMITED_API),
]
)