-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
76 lines (70 loc) · 1.54 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from pathlib import Path
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, setup
path = Path(__file__).parent
include_dirs = [
str(path / "include"),
str(path / ".venv/include"),
np.get_include(),
]
library_dirs = [
str(path / "lib"),
str(path / ".venv/lib"),
]
# https://www.hlibpro.com/doc/3.1/install.html
# https://www.intel.com/content/www/us/en/develop/documentation/get-started-with-mkl-for-dpcpp/top.html
libraries = [
"hpro",
"lapack",
"blas",
"boost_filesystem",
"boost_system",
"boost_program_options",
"boost_iostreams",
"tbb",
"z",
"metis",
"fftw3",
"gsl",
"gslcblas",
"m",
"hdf5",
"hdf5_cpp",
"m",
"stdc++",
] + [
"mkl_intel_lp64",
"mkl_intel_thread",
"mkl_core",
"iomp5",
"pthread",
"m",
"dl",
]
extra_compile_args = ["-Wall", "-O3", "-fopenmp", "-fPIC"]
extensions = [
Extension(
"*",
["KoLesky/*.pyx"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=include_dirs,
library_dirs=library_dirs,
libraries=libraries,
runtime_library_dirs=library_dirs,
extra_compile_args=extra_compile_args,
),
]
setup(
ext_modules=cythonize(
extensions,
annotate=True,
compiler_directives={
"language_level": 3,
"boundscheck": False,
"wraparound": False,
"initializedcheck": False,
"cdivision": True,
},
),
)