-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
35 lines (29 loc) · 1.22 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
from distutils.core import setup
from distutils.extension import Extension
import numpy
try:
numpy_include = numpy.get_include()
except AttributeError:
numpy_include = numpy.get_numpy_include()
try:
from Cython.Distutils import build_ext
ext_modules = [Extension("ForceFields", ["ForceFields.pyx","ForceFields.pxd"],
include_dirs=[numpy_include],
extra_compile_args=["-O3","-ffast-math"]),
Extension("cIntegrator", ["cIntegrator.pyx"],
include_dirs=[numpy_include],
extra_compile_args=["-O3","-ffast-math"])]
setup(name = 'Python ForceFields and Integrator modules',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules)
except:
ext_modules = [Extension("ForceFields", ["ForceFields.c"],
include_dirs=[numpy_include],
extra_compile_args=["-O3","-ffast-math"]),
Extension("cIntegrator", ["cIntegrator.c"],
include_dirs=[numpy_include],
extra_compile_args=["-O3","-ffast-math"])]
setup(
name = 'Python ForceFields and Integrator modules',
ext_modules = ext_modules
)