forked from SMTorg/smt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
80 lines (73 loc) · 1.97 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
77
78
79
80
'''
Author: Dr. John T. Hwang <[email protected]>
Dr. Mohamed A. Bouhlel <mbouhlel@umich>
This package is distributed under New BSD license.
'''
from setuptools import setup, Extension
import os
import sys
from subprocess import call
import numpy as np
try:
import Cython
except ImportError:
import pip
pip.main(['install', 'Cython'])
from Cython.Build import cythonize
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(name='smt',
version='0.2',
description='The Surrogate Modeling Toolbox (SMT)',
author='Mohamed Amine Bouhlel',
author_email='[email protected]',
license='BSD-3',
packages=[
'smt',
'smt/surrogate_models',
'smt/problems',
'smt/sampling_methods',
'smt/utils',
],
install_requires=[
'scikit-learn',
'pyDOE',
'matplotlib',
'numpydoc',
'six>=1.10',
'scipy'
],
zip_safe=False,
ext_modules=ext,
url = 'https://github.com/SMTorg/smt', # use the URL to the github repo
download_url = 'https://github.com/SMTorg/smt/archive/v0.2.tar.gz',
)