-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
45 lines (34 loc) · 1.36 KB
/
setup.py
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
43
44
45
from setuptools import setup, Extension
from numpy import get_include as get_np_include
from Cython.Build import cythonize
def main():
include_dirs = [get_np_include()]
define_macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
# fmt: off
extensions = [
Extension("ts2vg.graph._base",
[f"ts2vg/graph/_base.pyx"],
include_dirs=include_dirs,
define_macros=define_macros),
Extension("ts2vg.graph._natural",
[f"ts2vg/graph/_natural.pyx"],
include_dirs=include_dirs,
define_macros=define_macros),
Extension("ts2vg.graph._horizontal",
[f"ts2vg/graph/_horizontal.pyx"],
include_dirs=include_dirs,
define_macros=define_macros),
Extension("ts2vg.graph._natural_penetrable",
[f"ts2vg/graph/_natural_penetrable.pyx"],
include_dirs=include_dirs,
define_macros=define_macros),
Extension("ts2vg.graph._horizontal_penetrable",
[f"ts2vg/graph/_horizontal_penetrable.pyx"],
include_dirs=include_dirs,
define_macros=define_macros),
]
# fmt: on
extensions = cythonize(extensions)
setup(ext_modules=extensions)
if __name__ == "__main__":
main()