-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
165 lines (144 loc) · 4.02 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# -*- coding: utf-8 -*-
'''setup.py - Waqas Bhatti ([email protected]) - Nov 2016
This sets up the package.
Stolen from http://python-packaging.readthedocs.io/en/latest/everything.html and
modified by me.
'''
__version__ = '0.5.3'
import sys
from setuptools import setup
# pytesting stuff and imports copied wholesale from:
# https://docs.pytest.org/en/latest/goodpractices.html#test-discovery
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import shlex
import pytest
if not self.pytest_args:
targs = []
else:
targs = shlex.split(self.pytest_args)
errno = pytest.main(targs)
sys.exit(errno)
def readme():
with open('README.md') as f:
return f.read()
INSTALL_REQUIRES = [
'numpy>=1.4.0',
'scipy>=0.17.0',
'astropy>=1.3',
'matplotlib>=2.0',
'Pillow',
'jplephem',
'requests>=2.20',
'tornado',
'pyeebls>=0.1.6',
'tqdm',
'scikit-learn>=0.19',
]
EXTRAS_REQUIRE = {
'all':[
'psycopg2-binary',
'emcee==3.0rc1',
'h5py',
'batman-package',
'corner',
'transitleastsquares>=1.0',
'paramiko',
'boto3',
'awscli',
'google-api-python-client',
'google-cloud-storage',
'google-cloud-pubsub',
],
# for lcfit.mandelagol_fit_magseries
'mandelagol':[
'emcee==3.0rc1',
'h5py',
'batman-package',
'corner',
],
# for periodbase.tls
'tls':[
'emcee==3.0rc1',
'h5py',
'batman-package',
'transitleastsquares>=1.0',
'corner',
],
# for lcproc_aws and awsutils
'aws':[
'paramiko',
'boto3',
'awscli',
],
# for lcproc_gcp and gcputils
'gcp':[
'paramiko',
'google-api-python-client',
'google-cloud-storage',
'google-cloud-pubsub',
]
}
#############################
## RUN SETUP FOR ASTROBASE ##
#############################
# run setup.
setup(
name='astrobase',
version=__version__,
description=('Python modules and scripts '
'useful for variable star work in astronomy.'),
long_description=readme(),
long_description_content_type="text/markdown",
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Astronomy",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
keywords='astronomy',
url='https://github.com/waqasbhatti/astrobase',
author='Waqas Bhatti',
author_email='[email protected]',
license='MIT',
packages=[
'astrobase',
'astrobase.checkplot',
'astrobase.cpserver',
'astrobase.fakelcs',
'astrobase.hatsurveys',
'astrobase.lcfit',
'astrobase.lcmodels',
'astrobase.lcproc',
'astrobase.periodbase',
'astrobase.services',
'astrobase.varbase',
'astrobase.varclass',
],
install_requires=INSTALL_REQUIRES,
extras_require=EXTRAS_REQUIRE,
tests_require=['pytest==3.8.2',],
cmdclass={'test':PyTest},
entry_points={
'console_scripts':[
'hatlc=astrobase.hatsurveys.hatlc:main',
'checkplotserver=astrobase.cpserver.checkplotserver:main',
'checkplotlist=astrobase.cpserver.checkplotlist:main',
],
},
include_package_data=True,
zip_safe=False,
python_requires=">=3.5"
)