-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsetup.py
More file actions
36 lines (28 loc) · 750 Bytes
/
setup.py
File metadata and controls
36 lines (28 loc) · 750 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
35
36
"""Setup script for building Cython extensions."""
from setuptools import setup
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
def get_extensions():
"""Get list of extensions to build."""
if not USE_CYTHON:
return []
return cythonize(
[
"iso8583sim/core/_bitmap.pyx",
"iso8583sim/core/_parser_fast.pyx",
"iso8583sim/core/_validator_fast.pyx",
],
compiler_directives={
"language_level": "3",
"boundscheck": False,
"wraparound": False,
"cdivision": True,
},
)
if __name__ == "__main__":
setup(
ext_modules=get_extensions(),
)