-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·38 lines (32 loc) · 1004 Bytes
/
Copy pathsetup.py
File metadata and controls
executable file
·38 lines (32 loc) · 1004 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
#!/usr/bin/env python
import os
from Cython.Build import cythonize
from setuptools import Extension, setup
PROJ_ROOT = os.path.abspath(f"{__file__}/..")
PREFIX = os.path.join(PROJ_ROOT, "third_party/opt")
kwargs = {
"libraries": ["pet", "isl"],
"include_dirs": [os.path.join(PREFIX, "include"), "tadashi/src"],
"library_dirs": [os.path.join(PREFIX, "lib")],
"runtime_library_dirs": [os.path.join(PREFIX, "lib")],
"language": "c++",
# "undef_macros": ["NDEBUG"],
}
ext_modules = [
Extension(
"tadashi.scop",
["tadashi/scop.py", "tadashi/src/ccscop.cc", "tadashi/src/transformations.c"],
**kwargs,
),
Extension(
"tadashi.translators",
["tadashi/translators.py", "tadashi/src/ccscop.cc", "tadashi/src/codegen.c"],
**kwargs,
),
Extension(
"tadashi._tr_wrappers",
["tadashi/_tr_wrappers.py", "tadashi/src/transformations.c"],
**kwargs,
),
]
setup(ext_modules=cythonize(ext_modules))