forked from philhodge/stistools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·64 lines (58 loc) · 1.8 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
#!/usr/bin/env python
import os
import pkgutil
import sys
from glob import glob
from setuptools import setup, find_packages, Extension
from subprocess import check_call, CalledProcessError
if not pkgutil.find_loader('relic'):
relic_local = os.path.exists('relic')
relic_submodule = (relic_local and
os.path.exists('.gitmodules') and
not os.listdir('relic'))
try:
if relic_submodule:
check_call(['git', 'submodule', 'update', '--init', '--recursive'])
elif not relic_local:
check_call(['git', 'clone', 'https://github.com/spacetelescope/relic.git'])
sys.path.insert(1, 'relic')
except CalledProcessError as e:
print(e)
exit(1)
import relic.release
version = relic.release.get_info()
relic.release.write_template(version, 'stistools')
setup(
name = 'stistools',
version = version.pep386,
author = 'Paul Barrett, Phil Hodge',
author_email = '[email protected]',
description = 'Tools for STIS (Space Telescope Imaging Spectrograph)',
url = 'https://github.com/spacetelescope/stistools',
classifiers = [
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Software Development :: Libraries :: Python Modules',
],
install_requires = [
'astropy',
'nose',
'numpy',
'numpydoc',
'scipy',
'sphinx',
'sphinx_rtd_theme',
'stsci_rtd_theme',
'stsci.tools',
],
packages = find_packages(),
package_data = {
'stistools': [
'pars/*',
'LICENSE.txt',
]
},
)