forked from BDNYC/sedkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·82 lines (69 loc) · 2.35 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
#!/usr/bin/env python
from setuptools import setup, find_packages, Extension, Command
# allows you to build sphinx docs from the package
# main directory with "python setup.py build_sphinx"
try:
from sphinx.cmd.build import build_main
from sphinx.setup_command import BuildDoc
class BuildSphinx(BuildDoc):
"""Build Sphinx documentation after compiling C source files"""
description = 'Build Sphinx documentation'
def initialize_options(self):
BuildDoc.initialize_options(self)
def finalize_options(self):
BuildDoc.finalize_options(self)
def run(self):
build_cmd = self.reinitialize_command('build_ext')
build_cmd.inplace = 1
self.run_command('build_ext')
build_main(['-b', 'html', './docs', './docs/_build/html'])
except ImportError:
class BuildSphinx(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
print('!\n! Sphinx is not installed!\n!', file=sys.stderr)
exit(1)
DOCS_REQUIRE = [
'nbsphinx',
'sphinx',
'sphinx-automodapi',
'sphinx-rtd-theme',
'stsci-rtd-theme',
'extension-helpers',
]
TESTS_REQUIRE = [
'pytest',
]
setup(
name='sedkit',
description='Spectral energy distribution construction and analysis tools',
author='Joe Filippazzo',
author_email='[email protected]',
license='MIT',
url='https://github.com/hover2pi/sedkit',
keywords=['astronomy'],
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',
],
packages=find_packages(exclude=["examples"]),
version='1.2.4',
setup_requires=['setuptools_scm'],
install_requires=['numpy', 'astropy', 'bokeh', 'emcee', 'pysynphot', 'scipy', 'astroquery', 'dustmaps', 'pandas','svo_filters', 'healpy'],
include_package_data=True,
extras_require={
'docs': DOCS_REQUIRE,
'test': TESTS_REQUIRE,
},
tests_require=TESTS_REQUIRE,
cmdclass={
'build_sphinx': BuildSphinx
},)