-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
87 lines (68 loc) · 2.31 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
import sys
import warnings
# if setup tools is not installed, bootstrap it
try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
if sys.version_info < (2, 7):
sys.exit("Python version >=2.7 required")
def extras_require(key=None):
"""Deal with extra requirements
Parameters
----------
key : string, optional
if not none, returns the requirements only for the given option
Returns
-------
dictionary of requirements
if key is not None: list of requirements
"""
req_dic = {'py'}
req_dic = {'doc': ['sphinx==1.5', 'numpydoc>=0.6', 'alabaster',
'sphinxcontrib-httpdomain']
}
req_dic['livedoc'] = req_dic['doc'] + ['sphinx-autobuild>=0.5.2', ]
req_dic['all'] = set(sum((v for v in req_dic.values()), []))
if key:
return req_dic[key]
else:
return req_dic
install_requires = ['numpy', 'scipy', 'astropy', 'matplotlib', 'astroquery']
# entry points
# scripts
entry_points = {'console_scripts':
['quick_fit = stellarSEDfits.quick_fit:main',
'qfit_gaia = stellarSEDfits.qfit_gaia:main']}
setup(
# package description and version
name="stellarSEDfits",
version='1.0.1',
author="Greg Zeiman",
author_email="[email protected]",
description="Stellar SED fitting code",
long_description=open("README.md").read(),
# custom test class
# list of packages and data
packages=find_packages(),
# get from the MANIFEST.in file which extra file to include
include_package_data=True,
# don't zip when installing
zip_safe=False,
# entry points: creates vhc script upon installation
entry_points=entry_points,
# dependences
setup_requires=[],
install_requires=install_requires,
extras_require=extras_require(),
classifiers=["Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: Unix",
"Programming Language :: Python :: 2.7",
"Topic :: Scientific/Engineering :: Astronomy",
]
)