forked from autotest/autotest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
96 lines (78 loc) · 2.94 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
# High level way of installing each autotest component
import client.setup
import frontend.setup
import cli.setup
import server.setup
import scheduler.setup
import database.setup
import tko.setup
import utils.setup
import mirror.setup
from distutils.core import setup
try:
import autotest.common as common
except ImportError:
import common
from autotest.client.shared import version
def _combine_dicts(list_dicts):
result_dict = {}
for d in list_dicts:
for k in d:
result_dict[k] = d[k]
return result_dict
def get_package_dir():
return _combine_dicts([client.setup.get_package_dir(),
frontend.setup.get_package_dir(),
cli.setup.get_package_dir(),
server.setup.get_package_dir(),
scheduler.setup.get_package_dir(),
database.setup.get_package_dir(),
tko.setup.get_package_dir(),
utils.setup.get_package_dir(),
mirror.setup.get_package_dir()])
def get_packages():
return (client.setup.get_packages() +
frontend.setup.get_packages() +
cli.setup.get_packages() +
server.setup.get_packages() +
scheduler.setup.get_packages() +
database.setup.get_packages() +
tko.setup.get_packages() +
utils.setup.get_packages() +
mirror.setup.get_packages())
def get_data_files():
return (client.setup.get_data_files() +
tko.setup.get_data_files() +
utils.setup.get_data_files() +
mirror.setup.get_data_files())
def get_package_data():
return _combine_dicts([client.setup.get_package_data(),
frontend.setup.get_package_data(),
cli.setup.get_package_data(),
server.setup.get_package_data(),
scheduler.setup.get_package_data(),
database.setup.get_package_data(),
tko.setup.get_package_data(),
utils.setup.get_package_data()])
def get_scripts():
return (client.setup.get_scripts() +
frontend.setup.get_scripts() +
cli.setup.get_scripts() +
server.setup.get_scripts() +
scheduler.setup.get_scripts() +
database.setup.get_scripts() +
tko.setup.get_scripts())
def run():
setup(name='autotest',
description='Autotest test framework',
maintainer='Lucas Meneghel Rodrigues',
maintainer_email='[email protected]',
version=version.get_version(),
url='http://autotest.github.com',
package_dir=get_package_dir(),
package_data=get_package_data(),
packages= get_packages(),
scripts=get_scripts(),
data_files=get_data_files())
if __name__ == '__main__':
run()