-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup_conda.py
205 lines (191 loc) · 6.77 KB
/
setup_conda.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
import numpy
#from findblas.distutils import build_ext_with_blas
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
ext_modules = [
Extension(
"bonndit.utilc.blas_lapack",
["src/bonndit/utilc/blas_lapack.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.utilc.cython_helpers",
["src/bonndit/utilc/cython_helpers.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.utilc.hota",
["src/bonndit/utilc/hota.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.utilc.trilinear",
["src/bonndit/utilc/trilinear.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.utilc.structures",
["src/bonndit/utilc/structures.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.utilc.penalty_spherical",
["src/bonndit/utilc/penalty_spherical.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.utilc.lowrank",
["src/bonndit/utilc/lowrank.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.directions.fodfapprox",
["src/bonndit/directions/fodfapprox.pyx"],
include_dirs=[numpy.get_include(), '.'],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
extra_compile_args=['-fopenmp', '-Ofast'],
extra_link_args=['-fopenmp'],
),
Extension(
"bonndit.tracking.ItoW",
["src/bonndit/tracking/ItoW.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.tracking.alignedDirection",
["src/bonndit/tracking/alignedDirection.pyx"],
include_dirs=[numpy.get_include()],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
), Extension(
"bonndit.tracking.kalman.model",
["src/bonndit/tracking/kalman/model.pyx"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
libraries=["pthread", "m", "dl"],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.tracking.kalman.kalman",
["src/bonndit/tracking/kalman/kalman.pyx"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[numpy.get_include()],
libraries=["pthread", "m", "dl"],
extra_compile_args=["-Wall", "-m64", '-Ofast'],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.tracking.interpolation",
["src/bonndit/tracking/interpolation.pyx"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[numpy.get_include()],
libraries=[ "pthread", "m", "dl"],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.tracking.integration",
["src/bonndit/tracking/integration.pyx"],
include_dirs=[numpy.get_include()],
libraries=["pthread", "m", "dl"],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.tracking.stopping",
["src/bonndit/tracking/stopping.pyx"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[numpy.get_include()],
libraries=[ "pthread", "m", "dl"],
extra_compile_args=["-Wall", "-m64", "-Ofast"],
extra_link_args=["-Wl,--no-as-needed"]
),
Extension(
"bonndit.tracking.tracking_prob",
["src/bonndit/tracking/tracking_prob.pyx"],
extra_compile_args=['-fopenmp', "-Ofast"],
extra_link_args=['-fopenmp'],
),
Extension(
"bonndit.pmodels.means",
["src/bonndit/pmodels/means.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.pmodels.model_avg",
["src/bonndit/pmodels/model_avg.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.filter.filter",
["src/bonndit/filter/filter.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.filter.filter",
["src/bonndit/filter/filter.pyx"],
extra_compile_args=["-Ofast"],
),
Extension(
"bonndit.directions.csd_peaks",
["src/bonndit/directions/csd_peaks.pyx"],
include_dirs=[numpy.get_include()],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
extra_compile_args=["-Ofast"],
),
]
print(find_packages('src'))
setup(
author="Johannes Gruen",
author_email='jgruen@uni-bonn.de',
classifiers=[
'Topic :: Scientific/Engineering',
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
description="The bonndit package contains the latest diffusion imaging tools developed at the University of Bonn.",
# install_requires=requirements,
license="GNU General Public License v3",
long_description=readme + '\n\n' + history,
include_package_data=True,
keywords='bonndit',
name='bonndit',
packages=find_packages('src', exclude=('tests',)),
package_dir={'': 'src'},
scripts=['scripts/mtdeconv',
'scripts/stdeconv',
'scripts/bonndit2mrtrix'
'scripts/kurtosis',
'scripts/dtiselectvols',
'scripts/low-rank-k-approx',
'scripts/peak-modelling',
'scripts/prob-tracking',
'scripts/bundle-filtering',
'scripts/csd-peaks',
'scripts/data2fodf'],
ext_modules=cythonize(ext_modules, compiler_directives={'boundscheck': False, 'wraparound': False,
'optimize.unpack_method_calls': False}),
# cmdclass={'build_ext': build_ext_with_blas},
package_data={"": ['*.pxd', '*.npz', '*.pts']},
url='https://github.com/MedVisBonn/bonndit',
test_suite='tests',
version='0.3.1',
zip_safe=False,
)