forked from funkey/waterz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (45 loc) · 1.2 KB
/
setup.py
File metadata and controls
51 lines (45 loc) · 1.2 KB
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
46
47
48
49
50
51
import sys
import numpy
from Cython.Build import cythonize
from setuptools import Extension, setup
include_dirs = [
"src/waterz",
"src/waterz/backend",
numpy.get_include(),
]
if sys.platform == "darwin":
include_dirs.append("/opt/homebrew/include") # homebrew ... for boost
evaluate = Extension(
name="waterz.evaluate",
sources=[
"src/waterz/evaluate.pyx",
"src/waterz/frontend_evaluate.cpp",
],
include_dirs=include_dirs,
language="c++",
extra_link_args=["-std=c++11"],
extra_compile_args=["-std=c++11", "-w"],
)
merge = Extension(
name="waterz.merge",
sources=[
"src/waterz/merge.pyx",
"src/waterz/frontend_merge.cpp",
],
include_dirs=include_dirs,
language="c++",
extra_link_args=["-std=c++11"],
extra_compile_args=["-std=c++11", "-w", "-O2"],
)
region_graph = Extension(
name="waterz.region_graph",
sources=[
"src/waterz/region_graph.pyx",
"src/waterz/frontend_region_graph.cpp",
],
include_dirs=include_dirs,
language="c++",
extra_link_args=["-std=c++11"],
extra_compile_args=["-std=c++11", "-w", "-O2"],
)
setup(ext_modules=cythonize([evaluate, merge, region_graph]))