This repository was archived by the owner on Dec 2, 2024. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·64 lines (57 loc) · 2.88 KB
/
Copy pathsetup.py
File metadata and controls
executable file
·64 lines (57 loc) · 2.88 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
53
54
55
56
57
58
59
60
61
62
63
# Copyright (C) 2013 Matthew C. Zwier, Joshua L. Adelman, and Lillian T. Chong.
#
# This file is part of WESTPA.
#
# WESTPA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# WESTPA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with WESTPA. If not, see <http://www.gnu.org/licenses/>.
from distutils.core import setup
from distutils.extension import Extension
import numpy
numpy_include = numpy.get_include()
try:
from Cython.Distutils import build_ext
use_cython = True
cmdclass = {'build_ext': build_ext}
except ImportError:
use_cython = False
cmdclass = {}
finally:
print('Regenerating C extension code using Cython: {}'.format(use_cython))
suffix = 'pyx' if use_cython else 'c'
setup(cmdclass = cmdclass,
ext_modules = [Extension("fasthist._fasthist",
["fasthist/_fasthist.{}".format(suffix)], #,"fasthist/_fasthist_supp.c"],
include_dirs=['.', numpy_include],
# hack-ish; included since my dev box has trouble
extra_compile_args=['-O3']),
Extension("trajtree._trajtree",
["trajtree/_trajtree.{}".format(suffix)],
include_dirs=['.', numpy_include],
extra_compile_args=['-O3']),
Extension("mclib._mclib",
["mclib/_mclib.{}".format(suffix)],
include_dirs=['.', numpy_include],
extra_compile_args=['-O3']),
Extension("westpa.binning._assign",
["westpa/binning/_assign.{}".format(suffix)],
include_dirs=['.', numpy_include],
# hack-ish; included since my dev box has trouble
extra_compile_args=['-O3']),
Extension("westpa.kinetics._kinetics",
["westpa/kinetics/_kinetics.{}".format(suffix)],
include_dirs=['.', numpy_include],
extra_compile_args=['-O3']),
Extension("postanalysis._stats",
["postanalysis/_stats.{}".format(suffix)],
include_dirs=['.', numpy_include],
extra_compile_args=['-O3']),])