forked from openslide/openslide-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
26 lines (23 loc) · 677 Bytes
/
Copy pathsetup.py
File metadata and controls
26 lines (23 loc) · 677 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
import sys
from setuptools import Extension, setup
# use the Limited API on Python 3.11+; build release-specific wheels on
# older Python
_abi3 = sys.version_info >= (3, 11)
setup(
ext_modules=[
Extension(
'openslide._convert',
['openslide/_convert.c'],
# hide symbols that aren't in the Limited API
define_macros=[('Py_LIMITED_API', '0x030b0000')] if _abi3 else [],
# tag extension module for Limited API
py_limited_api=_abi3,
),
],
options={
# tag wheel for Limited API
'bdist_wheel': {'py_limited_api': 'cp311'}
if _abi3
else {},
},
)