-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
35 lines (31 loc) · 979 Bytes
/
setup.py
File metadata and controls
35 lines (31 loc) · 979 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
import sys
import eigency
import numpy as np
from Cython.Build import cythonize
from setuptools import setup
from setuptools.extension import Extension
extra_compile_args = []
if sys.platform in ("linux", "darwin"):
extra_compile_args.append("-std=c++17")
elif sys.platform == "win32":
extra_compile_args.append("/std:c++17")
extensions = cythonize(
[
Extension(
"GeneralTmm._GeneralTmmCppExt",
sources=[
"GeneralTmm/src/GeneralTmm.pyx",
"GeneralTmm/src/Common.cpp",
"GeneralTmm/src/Layer.cpp",
"GeneralTmm/src/Material.cpp",
"GeneralTmm/src/Tmm.cpp",
],
include_dirs=[np.get_include(), "GeneralTmm/src", "GeneralTmm/src/Simplex"] + eigency.get_includes(),
language="c++",
extra_compile_args=extra_compile_args,
),
]
)
setup(
ext_modules=extensions,
)