forked from RazerM/orbital
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
59 lines (46 loc) · 1.52 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
#!/usr/bin/env python3
import re
import sys
from setuptools import setup, Command, find_packages
INIT_FILE = 'orbital/__init__.py'
init_data = open(INIT_FILE).read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", init_data))
AUTHOR_EMAIL = metadata['author']
VERSION = metadata['version']
LICENSE = metadata['license']
DESCRIPTION = metadata['description']
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
requires = ['numpy', 'scipy', 'astropy', 'matplotlib', 'represent>=1.3.0',
'sgp4']
class PyTest(Command):
"""Allow 'python setup.py test' to run without first installing pytest"""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
import sys
errno = subprocess.call([sys.executable, 'runtests.py'])
raise SystemExit(errno)
setup(
name='OrbitalPy',
version=VERSION,
description=DESCRIPTION,
long_description=open('README').read(),
author=AUTHOR,
author_email=EMAIL,
url='https://github.com/RazerM/orbital',
packages=find_packages(),
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Astronomy',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
license=LICENSE,
install_requires=requires)