forked from gwastro/gwin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·118 lines (98 loc) · 3.34 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2018 Collin Capano
#
# This file is part of GWIn
#
# GWIn is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GWIn is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GWIn. If not, see <http://www.gnu.org/licenses/>.
"""Setup the GWIn package
"""
import os.path
import re
import sys
from setuptools import (setup, find_packages)
import versioneer
# -- versioning ---------------------------------------------------------------
cmdclass = versioneer.get_cmdclass()
__version__ = versioneer.get_version()
# -- dependencies -------------------------------------------------------------
setup_requires = []
if set(('test',)).intersection(sys.argv):
setup_requires.extend(['pytest_runner'])
install_requires = [
'numpy',
'pycbc>=1.11.1',
'matplotlib',
'scipy',
'h5py',
'corner',
]
try: # try to detect system install of lalinference
import lalinference
except ImportError: # fall-back to installing lalsuite wheels
install_requires.append('lalsuite')
extras_require = {
'kombine': ['kombine'],
'emcee': ['emcee'],
'docs': ['sphinx >= 1.7.1', 'sphinx_rtd_theme', 'numpydoc',
'sphinxcontrib_programoutput'],
}
tests_require = [
'pytest>=2.8',
]
if sys.version < '3':
tests_require.append('mock')
# -- files --------------------------------------------------------------------
def find_scripts(scripts_dir='bin'):
"""Get relative file paths for all files under the ``scripts_dir``
"""
scripts = []
for (dirname, _, filenames) in os.walk(scripts_dir):
scripts.extend([os.path.join(dirname, fn) for fn in filenames])
return scripts
# -- setup --------------------------------------------------------------------
# get long description from README
with open('README.rst', 'rb') as f:
longdesc = f.read().decode().strip()
# run setup
setup(
name='gwin',
version=__version__,
description="A python package for Bayesian inference of "
"gravitational-wave data",
long_description=longdesc,
author='Collin Capano',
author_email='collin.capano@ligo.org',
url='https://github.com/gwastro/gwin',
license='GPLv3',
cmdclass=cmdclass,
packages=find_packages(),
scripts=find_scripts(),
setup_requires=setup_requires,
install_requires=install_requires,
extras_require=extras_require,
tests_require=tests_require,
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Physics',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
],
)