-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathsetup.py
More file actions
134 lines (132 loc) · 4.06 KB
/
setup.py
File metadata and controls
134 lines (132 loc) · 4.06 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
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
from setuptools import setup, Extension
from Cython.Build import cythonize
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++",
)
)
# Port of scipy.spatial.cKDTree (scipy BSD-3-Clause license). See
# moleculekit/kdtree/README.md for licensing details. We strip the
# scipy.sparse dependency, so only the Cython/C++ sources are needed.
extentions.append(
Extension(
"moleculekit.kdtree._ckdtree",
sources=[
"moleculekit/kdtree/src/build.cxx",
"moleculekit/kdtree/src/count_neighbors.cxx",
"moleculekit/kdtree/src/query.cxx",
"moleculekit/kdtree/src/query_ball_point.cxx",
"moleculekit/kdtree/src/query_ball_tree.cxx",
"moleculekit/kdtree/src/query_pairs.cxx",
"moleculekit/kdtree/src/sparse_distances.cxx",
"moleculekit/kdtree/_ckdtree.pyx",
],
include_dirs=[
"moleculekit/kdtree/src",
numpy.get_include(),
],
extra_compile_args=["-O3", "-w"],
language="c++",
)
)
setup(zip_safe=False, ext_modules=cythonize(extentions, language_level="3"))