-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
executable file
·71 lines (60 loc) · 2.24 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
#! env/bin/python
import os.path
import numpy
from setuptools import setup
from setuptools.extension import Extension
try:
from Cython.Distutils import build_ext
from Cython.Build import cythonize
CYTHON = True
except ImportError:
CYTHON = False
def main():
packages = ['powerfit']
# the C or Cython extension
ext = '.pyx' if CYTHON else '.c'
ext_modules = [Extension("powerfit._powerfit",
[os.path.join("src", "_powerfit" + ext)],
include_dirs=[numpy.get_include()]),
Extension("powerfit._extensions",
[os.path.join("src", "_extensions.c")],
include_dirs=[numpy.get_include()],
extra_compile_args=['-ffast-math'],
),
]
cmdclass = {}
if CYTHON:
ext_modules = cythonize(ext_modules)
cmdclass = {'build_ext' : build_ext}
package_data = {'powerfit': [os.path.join('data', '*.npy'), 'kernels.cl']}
description = ("Rigid body fitting of high-resolution structures in "
"low-resolution cryo-electron microscopy density maps")
setup(name="powerfit",
version='2.0.0',
description=description,
url="https://github.com/haddocking/powerfit",
author='Gydo C.P. van Zundert',
author_email='[email protected]',
license="Apache",
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2.7',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
],
packages=packages,
package_data = package_data,
install_requires=['numpy>=1.8', 'scipy'],
entry_points={
'console_scripts': [
'powerfit = powerfit.powerfit:main',
'image-pyramid = powerfit.scripts:image_pyramid',
'em2em = powerfit.scripts:em2em',
]
},
ext_modules=ext_modules,
include_dirs=[numpy.get_include()],
cmdclass=cmdclass,
)
if __name__=='__main__':
main()