forked from cylc/cylc-flow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
148 lines (133 loc) · 3.85 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
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/env python
# coding=utf-8
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & Contributors.
#
# 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, see <http://www.gnu.org/licenses/>.
import codecs
import re
from glob import glob
from os.path import join, dirname, abspath
from setuptools import setup, find_namespace_packages
here = abspath(dirname(__file__))
def read(*parts):
with codecs.open(join(here, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
install_requires = [
'aiofiles==0.7.*',
'ansimarkup>=1.0.0',
'colorama>=0.4,<=1',
'graphene>=2.1,<3',
'jinja2==2.11.*',
'metomi-isodatetime>=1!2.0.2, <1!2.1.0',
'protobuf==3.15.*',
'psutil>=5.6.0',
'pyuv==1.4.*',
'pyzmq==19.0.*',
'setuptools>=49',
'urwid==2.*',
]
tests_require = [
'async-timeout>=3.0.0',
'async_generator',
'coverage>=5.0.0',
'flake8-broken-line>=0.3.0',
'flake8-bugbear>=21.0.0',
'flake8-builtins>=1.5.0',
'flake8-comprehensions>=3.5.0',
'flake8-debugger>=4.0.0',
'flake8-mutable>=1.2.0',
'flake8-simplify>=0.14.0',
'flake8>=3.0.0',
'mypy>=0.900',
# TODO: https://github.com/pytest-dev/pytest-asyncio/issues/ 209
'pytest-asyncio>=0.15.1',
'pytest-cov>=2.8.0',
'pytest-xdist>=2',
'pytest-env>=0.6.2',
'pytest>=6',
'testfixtures>=6.11.0',
# Type annotation stubs
# (http://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html) # noqa: E501
'types-Jinja2>=0.1.3',
'types-aiofiles>=0.1.3',
'types-pkg_resources>=0.1.2',
'types-protobuf>=0.1.10',
'types-six>=0.1.6',
]
extra_requires = {
'empy': [
'EmPy==3.3.*',
],
'all': [],
'report-timings': [
'pandas==1.*',
],
'main_loop-log_data_store': [
'pympler',
'matplotlib',
],
'main_loop-log_main_loop': [
'matplotlib',
],
'main_loop-log_memory': [
'pympler',
'matplotlib',
],
'graph': [
'pillow'
]
}
extra_requires['all'] = (
tests_require
+ list({
req
for reqs in extra_requires.values()
for req in reqs
})
)
with open('README.md') as readme_file:
readme = readme_file.read()
setup(
version=find_version("cylc", "flow", "__init__.py"),
long_description=readme,
long_description_content_type="text/markdown",
scripts=glob(join('bin', '*')),
packages=find_namespace_packages(include=["cylc.*"]),
package_data={
'cylc.flow': [
'etc/*.yaml',
'etc/flow*.eg',
'etc/job.sh',
'etc/syntax/*',
'etc/cylc-bash-completion',
'py.typed',
]
},
install_requires=install_requires,
tests_require=tests_require,
extras_require=extra_requires,
project_urls={
"Documentation": "https://cylc.github.io/documentation.html",
"Source": "https://github.com/cylc/cylc-flow",
"Tracker": "https://github.com/cylc/cylc-flow/issues"
}
)