forked from iiasa/aneris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·110 lines (93 loc) · 2.79 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
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',
# pin to <=1.0 is due to 1.1.0 regression in
# https://github.com/pandas-dev/pandas/issues/35753
'pandas>0.24<=1.0',
'PyYAML',
'xlrd',
'xlsxwriter',
'matplotlib',
'pyomo>=5'
]
EXTRA_REQUIREMENTS = {
'tests': ['pytest', 'coverage', 'coveralls', 'pytest', 'pytest-cov'],
'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 = [
'aneris',
]
pack_dir = {
'aneris': 'aneris',
}
entry_points = {
'console_scripts': [
# list CLIs here
'aneris=aneris.cli:main',
],
}
package_data = {
# add explicit data files here
# 'aneris': [],
}
install_requirements = REQUIREMENTS
extra_requirements = EXTRA_REQUIREMENTS
setup_kwargs = {
"name": "aneris-iamc",
'version': versioneer.get_version(),
"description": 'Harmonize Integrated Assessment Model Emissions '
'Trajectories',
"author": 'Matthew Gidden',
"author_email": 'matthew.gidden@gmail.com',
"url": 'http://github.com/iiasa/aneris',
'cmdclass': CMDCLASS,
'classifiers': classifiers,
'license': 'Apache License 2.0',
'packages': packages,
'package_dir': pack_dir,
'entry_points': entry_points,
'package_data': package_data,
'python_requires': '>=3.6',
'install_requires': install_requirements,
'extras_require': extra_requirements,
}
rtn = setup(**setup_kwargs)
if __name__ == "__main__":
main()