-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathsetup.py
More file actions
52 lines (46 loc) · 1.37 KB
/
setup.py
File metadata and controls
52 lines (46 loc) · 1.37 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
52
"""Minimal setup.py for building Cython/C++ extensions.
All project metadata is in pyproject.toml.
"""
import sys
import numpy as np
from Cython.Build import cythonize
from setuptools import Extension, setup
extra_compile_args = []
if not sys.platform.startswith("win"):
extra_compile_args.append("-std=c++11")
ext = (
cythonize(
Extension(
"smt.surrogate_models.rbfclib",
sources=["smt/src/rbf/rbf.cpp", "smt/src/rbf/rbfclib.pyx"],
language="c++",
extra_compile_args=extra_compile_args,
include_dirs=[np.get_include()],
)
)
+ cythonize(
Extension(
"smt.surrogate_models.idwclib",
sources=["smt/src/idw/idw.cpp", "smt/src/idw/idwclib.pyx"],
language="c++",
extra_compile_args=extra_compile_args,
include_dirs=[np.get_include()],
)
)
+ cythonize(
Extension(
"smt.surrogate_models.rmtsclib",
sources=[
"smt/src/rmts/rmtsclib.pyx",
"smt/src/rmts/utils.cpp",
"smt/src/rmts/rmts.cpp",
"smt/src/rmts/rmtb.cpp",
"smt/src/rmts/rmtc.cpp",
],
language="c++",
extra_compile_args=extra_compile_args,
include_dirs=[np.get_include()],
)
)
)
setup(ext_modules=ext)