-
Notifications
You must be signed in to change notification settings - Fork 37
/
setup.py
51 lines (44 loc) · 1.32 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
#!/usr/bin/env python
import sys
from distutils.core import setup, Command
from unittest import TextTestRunner, TestLoader
from doctest import DocTestSuite
PYTHON_MODULES = [
'hetzner',
'hetzner.failover',
'hetzner.rdns',
'hetzner.reset',
'hetzner.robot',
'hetzner.server',
'hetzner.util',
'hetzner.util.addr',
'hetzner.util.http',
'hetzner.util.scraping',
'hetzner.tests',
'hetzner.tests.test_util_addr',
]
class RunTests(Command):
description = "run test suite"
user_options = []
initialize_options = finalize_options = lambda self: None
def run(self):
tests = TestLoader().loadTestsFromName('hetzner.tests')
for module in PYTHON_MODULES:
try:
doctests = DocTestSuite(module)
except ValueError:
continue
tests.addTests(doctests)
result = TextTestRunner(verbosity=1).run(tests)
sys.exit(not result.wasSuccessful())
setup(name='hetzner',
version='0.8.3',
description='High level access to the Hetzner robot',
url='https://github.com/aszlig/hetzner',
author='aszlig',
author_email='[email protected]',
scripts=['hetznerctl'],
py_modules=PYTHON_MODULES,
python_requires='>=3.7',
cmdclass={'test': RunTests},
license='BSD')