-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathsetup.py
73 lines (56 loc) · 1.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
"""WARNING : THIS SCRIPT IS NOT CURRENTLY OPERATIONAL.
"""
import logging
import os
from setuptools import find_packages, setup
from setuptools.command.develop import develop
from setuptools.command.install import install
with open('requirements.txt') as f:
required = f.read().splitlines()
dir_path = os.path.dirname(os.path.realpath(__file__))
exec(open(os.path.join(dir_path, 'astrocats', '__init__.py')).read())
def read(fname):
return open(
os.path.join(os.path.dirname(os.path.abspath(__file__)), fname)).read()
def setup_uc():
from astrocats.main import setup_user_config
setup_user_config(logging.getLogger())
class PostDevelopCommand(develop):
"""Post-develop command."""
def run(self):
setup_uc()
develop.run(self)
class PostInstallCommand(install):
"""Post-installation command."""
def run(self):
setup_uc()
install.run(self)
setup(
name="astrocats",
packages=find_packages(exclude=('*tidaldisruptions*',
'*novae*', '*faststars*')),
include_package_data=True,
version=__version__, # noqa
description=("Package for downloading, analyzing, and constructing open "
"astronomy catalogs."),
license=__license__, # noqa
author=__author__, # noqa
author_email="guillochon@gmail.com",
install_requires=required,
setup_requires=required,
url="https://github.com/astrocatalogs/astrocats",
download_url=(
'https://github.com/astrocatalogs/astrocats/tarball/' +
__version__ # noqa
),
cmdclass={
'develop': PostDevelopCommand,
'install': PostInstallCommand,
},
keywords="astronomy",
long_description=read('README.md'),
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.5"
])