-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathsetup.py
116 lines (114 loc) · 3.27 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
from setuptools import setup, Extension
from Cython.Build import cythonize
import versioneer
import numpy
import os
extentions = [
"moleculekit/interactions/hbonds/hbonds.pyx",
"moleculekit/interactions/pipi/pipi.pyx",
"moleculekit/interactions/cationpi/cationpi.pyx",
"moleculekit/interactions/sigmahole/sigmahole.pyx",
"moleculekit/wrapping/wrapping.pyx",
"moleculekit/bondguesser_utils/bondguesser_utils.pyx",
"moleculekit/atomselect_utils/atomselect_utils.pyx",
"moleculekit/distance_utils/distance_utils.pyx",
"moleculekit/occupancy_utils/occupancy_utils.pyx",
"moleculekit/cython_utils/cython_utils.pyx",
]
extentions = [
Extension(
name=os.path.dirname(ext).replace("/", "."),
sources=[ext],
include_dirs=[numpy.get_include()],
language="c++",
extra_compile_args=["-O3"],
# extra_link_args=["-fopenmp"],
)
for ext in extentions
]
extentions.append(
Extension(
"moleculekit.xtc",
sources=[
"moleculekit/fileformats/xtc/src/xdrfile_xtc.cpp",
"moleculekit/fileformats/xtc/src/xdrfile.cpp",
"moleculekit/fileformats/xtc/src/xtc_src.cpp",
"moleculekit/fileformats/xtc/xtc.pyx",
],
include_dirs=[
"moleculekit/fileformats/xtc/include/",
"moleculekit/fileformats/xtc/",
numpy.get_include(),
],
language="c++",
)
)
extentions.append(
Extension(
"moleculekit.trr",
sources=[
"moleculekit/fileformats/xtc/src/xdrfile_trr.c",
"moleculekit/fileformats/xtc/src/xdrfile.cpp",
"moleculekit/fileformats/xtc/src/xdr_seek.c",
"moleculekit/fileformats/xtc/trr.pyx",
],
include_dirs=[
"moleculekit/fileformats/xtc/include/",
"moleculekit/fileformats/xtc/",
numpy.get_include(),
],
language="c",
)
)
extentions.append(
Extension(
"moleculekit.dcd",
sources=[
"moleculekit/fileformats/dcd/src/dcdplugin.c",
"moleculekit/fileformats/dcd/dcd.pyx",
],
include_dirs=[
"moleculekit/fileformats/dcd/include/",
"moleculekit/fileformats/dcd/",
numpy.get_include(),
],
language="c",
)
)
extentions.append(
Extension(
"moleculekit.binpos",
sources=[
"moleculekit/fileformats/binpos/src/binposplugin.c",
"moleculekit/fileformats/binpos/binpos.pyx",
],
include_dirs=[
"moleculekit/fileformats/binpos/include/",
"moleculekit/fileformats/binpos/",
numpy.get_include(),
],
language="c",
)
)
extentions.append(
Extension(
"moleculekit.tmalign",
sources=[
"moleculekit/tmalign/src/TMAlign.cpp",
"moleculekit/tmalign/tmalign_util.pyx",
],
include_dirs=[
"moleculekit/tmalign/include/",
"moleculekit/tmalign/",
numpy.get_include(),
],
extra_compile_args=["-w"],
language="c++",
)
)
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
zip_safe=False,
ext_modules=cythonize(extentions, language_level="3"),
)