forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
97 lines (86 loc) · 2.63 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
#!/usr/bin/env python
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
VERSION = '47.1.0'
tests_require = [
'pytest',
'pytest-cov',
'pytest-mock',
'pytest-asyncio',
'httmock',
'mock',
'setuptools-lint',
'flake8',
'psutil',
'hypothesis',
'tox',
'coverage',
'aiofiles',
'httptest',
]
# requests has a policy of not breaking apis between major versions
# http://docs.python-requests.org/en/latest/community/release-process/
install_requires = [
'requests>=2.4.3',
'mohawk>=0.3.4',
'python-dateutil>=2.8.2',
'slugid>=2',
'taskcluster-urls>=12.1.0',
'aiohttp>=3.7.4',
'async_timeout>=2.0.0',
]
# from http://testrun.org/tox/latest/example/basic.html
class Tox(TestCommand):
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.tox_args = None
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import tox
import shlex
args = self.tox_args
if args:
args = shlex.split(self.tox_args)
errno = tox.cmdline(args=args)
sys.exit(errno)
if sys.version_info[0] == 3 and sys.version_info[:2] < (3, 5):
raise Exception('This library does not support Python 3 versions below 3.5')
with open('README.md', encoding='utf8') as f:
long_description = f.read()
if __name__ == '__main__':
setup(
name='taskcluster',
version=VERSION,
description='Python client for Taskcluster',
long_description=long_description,
long_description_content_type="text/markdown",
author='Mozilla Taskcluster and Release Engineering',
author_email='[email protected]',
url='https://github.com/taskcluster/taskcluster',
packages=[
"taskcluster",
"taskcluster.aio",
"taskcluster.generated",
"taskcluster.generated.aio",
],
install_requires=install_requires,
test_suite="nose.collector",
tests_require=tests_require,
extras_require={
'test': tests_require,
},
cmdclass={'test': Tox},
zip_safe=False,
classifiers=[
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)