forked from sherpa/sherpa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
137 lines (126 loc) · 5.61 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
from __future__ import print_function
#
# Copyright (C) 2014, 2017, 2018 Smithsonian Astrophysical Observatory
#
#
# This program 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.
#
# This program 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 this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
try:
import setuptools
except:
import sys
print((
"WARNING\n"
"Could not import setuptools.\n"
"This might lead to an incomplete installation\n"
), file=sys.stderr)
# The module used to try to find the numpy module and error out if
# that could not be found, but it seems simpler to just error out
# here.
#
try:
from numpy.distutils import core
except ImportError:
import sys
print((
"You need to install NUMPY in order to build Sherpa\n"
"Other dependencies will be automatically installed\n"
"Please install NUMPY (e.g. pip install numpy) and try again."
), file=sys.stderr)
sys.exit(2)
from helpers.extensions import static_ext_modules
import versioneer
versioneer.VCS = 'git'
versioneer.versionfile_source = 'sherpa/_version.py'
versioneer.versionfile_build = 'sherpa/_version.py'
versioneer.tag_prefix = ''
versioneer.parentdir_prefix = 'sherpa-'
meta = dict(name='sherpa',
version=versioneer.get_version(),
author='Smithsonian Astrophysical Observatory / Chandra X-Ray Center',
author_email='[email protected]',
url='http://cxc.harvard.edu/sherpa/',
description='Modeling and fitting package for scientific data analysis',
license='GNU GPL v3',
long_description=open('README.md', 'rt').read(),
long_description_content_type='text/markdown',
platforms='Linux, Mac OS X',
install_requires=['numpy', 'six'],
tests_require=['mock', 'pytest-xvfb', 'pytest>=3.3'],
packages=['sherpa',
'sherpa.estmethods',
'sherpa.image',
'sherpa.models',
'sherpa.optmethods',
'sherpa.plot',
'sherpa.sim',
'sherpa.stats',
'sherpa.ui',
'sherpa.utils',
'sherpa.astro',
'sherpa.astro.datastack',
'sherpa.astro.datastack.plot_backend',
'sherpa.astro.io',
'sherpa.astro.models',
'sherpa.astro.optical',
'sherpa.astro.sim',
'sherpa.astro.ui',
'sherpa.astro.utils',
'sherpa.astro.xspec',
],
package_data={'sherpa': ['include/sherpa/*.hh',
'include/sherpa/astro/*.hh',
'tests/*'],
'sherpa.estmethods': ['tests/test_*.py'],
'sherpa.image': ['tests/test_*.py'],
'sherpa.models': ['tests/test_*.py'],
'sherpa.optmethods': ['tests/test_*.py'],
'sherpa.plot': ['tests/test_*.py'],
'sherpa.sim': ['tests/test_*.py'],
'sherpa.stats': ['tests/test_*.py'],
'sherpa.ui': ['tests/test_*.py'],
'sherpa.utils': ['tests/test_*.py'],
'sherpa.astro': ['tests/test_*.py'],
'sherpa.astro.datastack': ['tests/data/*', 'tests/*.py'],
'sherpa.astro.io': ['tests/test_*.py'],
'sherpa.astro.models': ['tests/test_*.py'],
'sherpa.astro.optical': ['tests/test_*.py'],
'sherpa.astro.sim': ['tests/test_*.py'],
'sherpa.astro.ui': ['tests/data/*', 'tests/test_*.py'],
'sherpa.astro.utils': ['tests/test_*.py'],
},
data_files=[('sherpa',
['sherpa/sherpa.rc', 'sherpa/sherpa-standalone.rc']), ],
ext_modules=static_ext_modules, cmdclass=versioneer.get_cmdclass(),
entry_points={
'console_scripts': [
'sherpa_test = sherpa:clitest',
'sherpa_smoke = sherpa:_smoke_cli',
]
},
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: C',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: Astronomy',
'Topic :: Scientific/Engineering :: Physics'
],
)
core.setup(**meta)