forked from IAMconsortium/pyam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·104 lines (88 loc) · 2.44 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
#!/usr/bin/env python
from __future__ import print_function
import glob
import os
import shutil
import versioneer
from setuptools import setup, Command
from subprocess import call
# Thanks to http://patorjk.com/software/taag/
logo = r"""
______ __ __ ______ __ __
/\ == \ /\ \_\ \ /\ __ \ /\ "-./ \
\ \ _-/ \ \____ \ \ \ __ \ \ \ \-./\ \
\ \_\ \/\_____\ \ \_\ \_\ \ \_\ \ \_\
\/_/ \/_____/ \/_/\/_/ \/_/ \/_/
"""
REQUIREMENTS = [
'argparse',
'numpy',
'requests',
'pandas>0.24',
'PyYAML',
'xlrd',
'xlsxwriter',
'matplotlib<=3.0.2',
'seaborn',
'six',
]
EXTRA_REQUIREMENTS = {
'tests': ['coverage', 'coveralls', 'pytest', 'pytest-cov', 'pytest-mpl'],
'deploy': ['twine', 'setuptools', 'wheel'],
}
# thank you https://stormpath.com/blog/building-simple-cli-interfaces-in-python
class RunTests(Command):
"""Run all tests."""
description = 'run tests'
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
"""Run all tests!"""
errno = call(['py.test', '--cov=skele', '--cov-report=term-missing'])
raise SystemExit(errno)
CMDCLASS = versioneer.get_cmdclass()
CMDCLASS.update({'test': RunTests})
def main():
print(logo)
classifiers = [
'License :: OSI Approved :: Apache Software License',
]
packages = [
'pyam',
]
pack_dir = {
'pyam': 'pyam',
}
entry_points = {
'console_scripts': [
# list CLIs here
],
}
package_data = {
'pyam': ['region_mappings/*'],
}
install_requirements = REQUIREMENTS
extra_requirements = EXTRA_REQUIREMENTS
setup_kwargs = {
'name': 'pyam-iamc',
'version': versioneer.get_version(),
'cmdclass': CMDCLASS,
'description': 'Analyze & Visualize Assessment Model Results',
'classifiers': classifiers,
'license': 'Apache License 2.0',
'author': 'Matthew Gidden & Daniel Huppmann',
'author_email': 'matthew.gidden@gmail.com',
'url': 'https://github.com/IAMconsortium/pyam',
'packages': packages,
'package_dir': pack_dir,
'entry_points': entry_points,
'package_data': package_data,
'install_requires': install_requirements,
'extras_require': extra_requirements,
}
rtn = setup(**setup_kwargs)
if __name__ == "__main__":
main()