forked from spacetelescope/wiimatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·110 lines (99 loc) · 2.87 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
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
try:
from distutils.config import ConfigParser
except ImportError:
from configparser import ConfigParser
conf = ConfigParser()
conf.read(['setup.cfg'])
# Get some config values
metadata = dict(conf.items('metadata'))
PACKAGENAME = metadata.get('package_name', 'wiimatch')
DESCRIPTION = metadata.get('description', 'A package for optimal "matching" '
'N-dimentional image background using '
'(multivariate) polynomials')
LONG_DESCRIPTION = metadata.get('long_description', 'README.rst')
LONG_DESCRIPTION_CONTENT_TYPE = metadata.get('long_description_content_type',
'text/x-rst')
AUTHOR = metadata.get('author', 'Mihai Cara')
AUTHOR_EMAIL = metadata.get('author_email', '[email protected]')
URL = metadata.get('url', 'https://github.com/spacetelescope/wiimatch')
LICENSE = metadata.get('license', 'BSD-3-Clause')
# load long description
this_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_dir, LONG_DESCRIPTION), encoding='utf-8') as f:
long_description = f.read()
PACKAGE_DATA = {
'': [
'README.rst',
'LICENSE.txt',
'CHANGELOG.rst',
'*.fits',
'*.txt',
'*.inc',
'*.cfg',
'*.csv',
'*.yaml',
'*.json'
],
}
INSTALL_REQUIRES = [
'numpy',
'scipy',
]
SETUP_REQUIRES = [
'setuptools_scm',
]
TESTS_REQUIRE = [
'pytest',
'pytest-cov',
'pytest-doctestplus',
]
DOCS_REQUIRE = [
'numpydoc',
'graphviz',
'sphinx',
'sphinx-rtd-theme',
'stsci-rtd-theme',
'sphinx_automodapi',
]
OPTIONAL_DEP = [
'scipy',
]
setup(
name=PACKAGENAME,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type=LONG_DESCRIPTION_CONTENT_TYPE,
url=URL,
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',
'Development Status :: 3 - Alpha',
],
use_scm_version=True,
setup_requires=SETUP_REQUIRES,
python_requires='>=3.7',
install_requires=INSTALL_REQUIRES,
tests_require=TESTS_REQUIRE,
packages=find_packages(),
package_data=PACKAGE_DATA,
ext_modules=[],
extras_require={
'docs': DOCS_REQUIRE,
'test': TESTS_REQUIRE,
'all': OPTIONAL_DEP,
},
project_urls={
'Bug Reports': 'https://github.com/spacetelescope/wiimatch/issues/',
'Source': 'https://github.com/spacetelescope/wiimatch/',
'Help': 'https://hsthelp.stsci.edu/',
},
)