-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
29 lines (25 loc) · 745 Bytes
/
setup.py
File metadata and controls
29 lines (25 loc) · 745 Bytes
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
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()
# Handle cython modules
try:
from Cython.Distutils import build_ext
use_cython = True
cmdclass = {'build_ext': build_ext}
except ImportError:
use_cython = False
cmdclass = {}
finally:
print 'use_cython: {}'.format(use_cython)
ext_modules = [Extension("pyqcprot", ["pyqcprot.{}".format('pyx' if use_cython else 'c')],
include_dirs=[numpy_include],
extra_compile_args=["-O3","-ffast-math"])]
setup(
name = 'Python qcprot module',
cmdclass = cmdclass,
ext_modules = ext_modules
)