forked from teemtee/tmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·143 lines (129 loc) · 3.66 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
#!/usr/bin/env python
# coding: utf-8
import re
from io import open
from typing import Dict, List
from setuptools import setup
# Parse version from the spec file
with open('tmt.spec', encoding='utf-8') as specfile:
lines = "\n".join(line.rstrip() for line in specfile)
match = re.search('Version: (.+)', lines)
assert match is not None, "Could not find 'Version:' in tmt.spec"
version = match.group(1).rstrip()
# acceptable version schema: major.minor[.patch][sub]
__version__ = version
__pkg__ = 'tmt'
__pkgdata__ = {
'tmt': [
'py.typed',
'export/templates/*',
'schemas/*.yaml',
'schemas/*/*.yaml',
'steps/execute/scripts/*',
'steps/report/html/*',
'steps/provision/mrack/*',
]
}
__pkgdir__: Dict[str, str] = {}
__pkgs__ = [
'tmt',
'tmt/export',
'tmt/plugins',
'tmt/steps',
'tmt/steps/discover',
'tmt/steps/provision',
'tmt/steps/prepare',
'tmt/steps/execute',
'tmt/steps/report',
'tmt/steps/finish',
]
__provides__ = ['tmt']
__desc__ = 'Test Management Tool'
__scripts__ = ['bin/tmt']
# Prepare install requires and extra requires
install_requires = [
'fmf>=1.2.1',
'click',
'requests',
'urllib3',
'ruamel.yaml',
'jinja2',
]
# typing_extensions is needed with Python 3.7 and older, types imported
# from that package (Literal, Protocol, TypedDict, ...) become available
# from typing since Python 3.8.
install_requires.append("typing-extensions>=3.7.4.3; python_version < '3.8'")
# dataclasses is needed with Python 3.6
install_requires.append("dataclasses; python_version < '3.7'")
# entry_points is part of Python 3.9+
install_requires.append("importlib_metadata; python_version < '3.9'")
extras_require = {
'docs': [
'sphinx>=3',
'sphinx_rtd_theme'],
'tests': [
'flake8',
'pytest',
'python-coveralls',
'requre',
'pre-commit',
'mypy',
'yq==3.1.1' # frozen to be able to install on el8
],
'provision': [
'testcloud>=0.9.2',
'mrack>=1.12.1',
],
'convert': [
'nitrate',
'markdown',
'python-bugzilla',
'html2text'],
'report-junit': ['junit_xml'],
'report-polarion': ['junit_xml', 'pylero'],
'export-polarion': ['pylero'],
}
extras_require['all'] = [
dependency
for extra in extras_require.values()
for dependency in extra]
pip_src = 'https://pypi.python.org/packages/source'
__deplinks__: List[str] = []
# README is in the parent directory
readme = 'README.rst'
with open(readme, encoding='utf-8') as _file:
readme = _file.read()
github = 'https://github.com/teemtee/tmt'
download_url = '{0}/archive/main.zip'.format(github)
setup(
url=github,
license='MIT',
author='Petr Splichal',
author_email='[email protected]',
maintainer='Petr Splichal',
maintainer_email='[email protected]',
download_url=download_url,
long_description=readme,
data_files=[],
classifiers=[
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Utilities',
],
keywords=['metadata', 'testing'],
dependency_links=__deplinks__,
description=__desc__,
install_requires=install_requires,
extras_require=extras_require,
name=__pkg__,
package_data=__pkgdata__,
package_dir=__pkgdir__,
packages=__pkgs__,
provides=__provides__,
scripts=__scripts__,
version=__version__
)