-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
42 lines (38 loc) · 917 Bytes
/
setup.py
File metadata and controls
42 lines (38 loc) · 917 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
37
38
39
40
41
42
import os
from setuptools import Extension, setup
from Cython.Build import cythonize
extra_compile_args = [
"-O3",
"-Ofast",
"-march=native",
"-flto",
"-fno-semantic-interposition",
"-fvisibility=hidden",
]
if os.environ.get("AVX512", "0") == "1":
extra_compile_args.append("-mavx512f")
ext = Extension(
"proxy",
["proxy.pyx"],
extra_compile_args=extra_compile_args,
extra_link_args=["-flto"],
define_macros=[
("CYTHON_CLINE_IN_TRACEBACK", 0),
("CYTHON_FAST_PYCALL", 1),
("CYTHON_USE_PYINT_INTERNALS", 1),
],
)
setup(
ext_modules=cythonize(
ext,
language_level="3",
compiler_directives={
"boundscheck": False,
"wraparound": False,
"cdivision": True,
"infer_types": True,
"nonecheck": False,
"initializedcheck": False,
},
)
)