-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
executable file
·62 lines (55 loc) · 1.95 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
import os
import sys
import numpy
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
sys.exit()
# Cython extensions
ext_modules=[
Extension('piccard.jitterext',
['piccard/jitterext.pyx'],
include_dirs = [numpy.get_include()],
extra_compile_args=["-O2"]),
Extension('piccard.choleskyext_omp',
['piccard/choleskyext_omp.pyx'],
include_dirs = [numpy.get_include(), 'piccard/'],
extra_link_args=["-liomp5"],
extra_compile_args=["-O2", "-fopenmp", "-fno-wrapv"]),
Extension('piccard.choleskyext',
['piccard/choleskyext.pyx'],
include_dirs = [numpy.get_include(), 'piccard/'],
extra_compile_args=["-O2", "-fno-wrapv"]) # 50% more efficient!
]
setup(
name="piccard",
version='2016.01',
author="Rutger van Haasteren",
author_email="[email protected]",
packages=["piccard"],
url="http://github.com/vhaasteren/piccard/",
license="GPLv3",
description="PTA analysis software",
long_description=open("README.md").read() + "\n\n"
+ "Changelog\n"
+ "---------\n\n"
+ open("HISTORY.md").read(),
package_data={"": ["README", "LICENSE", "AUTHORS.md"]},
include_package_data=True,
install_requires=["numpy", "scipy", "h5py", "healpy"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
"Programming Language :: Python",
],
ext_modules = cythonize(ext_modules)
)