-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup.py
More file actions
34 lines (26 loc) · 746 Bytes
/
setup.py
File metadata and controls
34 lines (26 loc) · 746 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
30
31
32
33
34
import platform
import sys
from setuptools import setup
cmdclass = {}
if 'CPython' == platform.python_implementation():
try:
import wheel.bdist_wheel
class BDistWheel(wheel.bdist_wheel.bdist_wheel):
def __init__(self, dist, **kw):
super().__init__(dist, **kw)
self.py_limited_api = None
def finalize_options(self):
self.py_limited_api = f'cp3{sys.version_info[1]}'
wheel.bdist_wheel.bdist_wheel.finalize_options(self)
cmdclass['bdist_wheel'] = BDistWheel
except ImportError:
pass
if '__main__' == __name__:
setup(
# Ensure limited API is set on CPython
cmdclass=cmdclass,
# CFFI
zip_safe=False,
ext_package='symbollightapi/bindings',
cffi_modules=['cffi_src/openssl_build.py:ffi_builder'],
)