-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
103 lines (89 loc) · 4.33 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
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
name = 'muLAn'
import sys
import os
import platform
from setuptools import setup, Extension, Command
from Cython.Build import cythonize
if platform.system() == 'Darwin':
macosv = platform.mac_ver()[0]
macosv_full = [int(a) for a in macosv.split('.')]
if (macosv_full[0] >= 10) & (macosv_full[1] > 9):
txt = "-mmacosx-version-min={:d}.{:d}".format(macosv_full[0], macosv_full[1])
txt = "-mmacosx-version-min=10.9"
extensions = [Extension(name="muLAn.models.vbb.vbb",
sources=["muLAn/models/vbb/vbb.pyx"],
language="c++",
extra_link_args=["-stdlib=libc++", txt])]
else:
extensions = [Extension(name="muLAn.models.vbb.vbb",
sources=["muLAn/models/vbb/vbb.pyx"],
language="c++")]
else:
extensions = [Extension(name="muLAn.models.vbb.vbb",
sources=["muLAn/models/vbb/vbb.pyx"],
language="c++")]
setup(
name = name,
ext_modules = cythonize(extensions, language_level=3),
data_files=[('lib/python3.8/site-packages/muLAn/models/espl_inputs', ['muLAn/models/espl_inputs/tab_Bo.p', 'muLAn/models/espl_inputs/tab_B1.p'])]
)
pjoin = os.path.join
here = os.path.abspath(os.path.dirname(__file__))
packages = []
for d, _, _ in os.walk(pjoin(here, name)):
if os.path.exists(pjoin(d, '__init__.py')):
packages.append(d[len(here)+1:].replace(os.path.sep, '.'))
version_ns = {}
with open(pjoin(here, name, '_version.py')) as f:
exec(f.read(), {}, version_ns)
setup_args = dict(
name = name,
version = version_ns['__version__'],
packages = packages,
description = "muLAn: gravitational MICROlensing Analysis code",
long_description= "muLAn: gravitational MICROlensing Analysis code",
author = 'Clement Ranc, Arnaud Cassan',
author_email = '[email protected], [email protected]',
url = 'https://github.com/muLAn-project/muLAn.git',
license = 'MIT',
platforms = "Linux, Mac OS X, Windows",
keywords = ['Astronomy', 'Microlensing', 'Science'],
classifiers = [
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT',
'Programming Language :: Python',
'Programming Language :: Python :: 3.8',
],
ext_modules = cythonize(extensions, language_level=3),
data_files=[('lib/python3.8/site-packages/muLAn/models/espl_inputs', ['muLAn/models/espl_inputs/tab_Bo.p', 'muLAn/models/espl_inputs/tab_B1.p'])],
)
if 'develop' in sys.argv or any(a.startswith('bdist') for a in sys.argv):
import setuptools
setuptools_args = {}
install_requires = setuptools_args['install_requires'] = [
'scikit-learn>=0.19.0',
'argparse>=1.1',
'astropy>=1.3.2',
'bokeh>=0.12.4',
'configparser>=3.5.0',
'Cython>=0.27.3',
'emcee>=2.2.1',
'GetDist>=0.2.6',
'matplotlib>=2.1.2',
'numpy>=1.12.1',
'pandas>=0.18.1',
'pbr>=0.11',
'PyAstronomy>=0.10.1',
'scipy>=0.18.1',
'tables',
'h5py',
'tqdm'
]
extras_require = setuptools_args['extras_require'] = {
}
if 'setuptools' in sys.modules:
setup_args.update(setuptools_args)
if __name__ == '__main__':
setup(**setup_args)