-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
102 lines (92 loc) · 2.88 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
#! /usr/bin/env python
#
# Copyright (C) 2015-17 California Institute of Technology
DESCRIPTION = "ztf_sim: Scheduling library for the Zwicky Transient Facility"
LONG_DESCRIPTION = """\
Scheduling library for the Zwicky Tranisent Facility
"""
DISTNAME = 'ztf_sim'
MAINTAINER = 'Eric Bellm'
MAINTAINER_EMAIL = '[email protected]'
URL = 'https://github.com/ZwickyTransientFacility/ztf_sim/'
LICENSE = 'BSD (3-clause)'
DOWNLOAD_URL = 'https://github.com/ZwickyTransientFacility/ztf_sim/'
VERSION = '1.0'
try:
from setuptools import setup
_has_setuptools = True
except ImportError:
from distutils.core import setup
def check_dependencies():
install_requires = []
# Just make sure dependencies exist, I haven't rigorously
# tested what the minimal versions that will work are
# (help on that would be awesome)
try:
import numpy
except ImportError:
install_requires.append('numpy')
try:
import scipy
except ImportError:
install_requires.append('scipy')
try:
import astropy
except ImportError:
install_requires.append('astropy')
try:
import astroplan
except ImportError:
install_requires.append('astroplan')
try:
import pandas
except ImportError:
install_requires.append('pandas')
try:
import sklearn
except ImportError:
install_requires.append('sklearn')
try:
import sklearn_pandas
except ImportError:
install_requires.append('sklearn_pandas')
try:
import xgboost
except ImportError:
install_requires.append('xgboost')
try:
import transitions
except ImportError:
install_requires.append('transitions')
try:
import gurobipy
except ImportError:
install_requires.append('gurobipy')
return install_requires
if __name__ == "__main__":
install_requires = check_dependencies()
setup(name=DISTNAME,
author=MAINTAINER,
author_email=MAINTAINER_EMAIL,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
license=LICENSE,
url=URL,
version=VERSION,
download_url=DOWNLOAD_URL,
install_requires=install_requires,
include_package_data=True,
zip_safe=False,
packages=['ztf_sim'],
scripts=['bin/run_ztf_sim', 'bin/analyze_ztf_sim', 'bin/load_ztf_sim'],
classifiers=[
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 3.6',
'License :: OSI Approved :: BSD License',
'Topic :: Scientific/Engineering :: Visualization',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS'],
)