-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.py
115 lines (97 loc) · 2.42 KB
/
build.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
"""
Extensible Test Automation Framework
"""
from pybuilder.core import init, use_plugin
use_plugin('python.core')
use_plugin('python.install_dependencies')
use_plugin('python.unittest')
# use_plugin('python.integrationtest')
use_plugin('python.distutils')
name = 'PyXTaf'
summary = 'Extensible Test Automation Framework'
default_task = [
'clean',
'install_build_dependencies',
'publish'
]
@init
def initializer(project):
project.version = '0.5.1.0'
project.summary = summary
project.description = __doc__
project.build_depends_on('setuptools')
project.build_depends_on('wheel')
project.build_depends_on('pip')
# project.build_depends_on_requirements(
# 'src/main/python/requirements.dev.txt'
# )
project.depends_on_requirements(
'src/main/python/requirements.txt'
)
# unit tests
project.set_property(
'dir_source_unittest_python',
'src/test/python/ut'
)
project.set_property(
'unittest_module_glob',
'test_*'
)
project.set_property(
'unittest_test_method_prefix',
'test_'
)
# integration tests
# project.set_property(
# "dir_source_integrationtest_python",
# "src/test/python/bpt"
# )
# project.set_property(
# "integrationtest_file_glob",
# "test_*"
# )
#
# project.set_property(
# "integrationtest_inherit_environment",
# True
# )
# project.set_property(
# 'dir_source_main_python',
# 'src/main/python'
# )
project.set_property(
'dir_source_main_scripts',
None
)
project.set_property(
'dir_dist_scripts',
None
)
project.set_property('dir_target', 'build')
project.set_property('dir_dist', 'dist')
exclude = (
''
)
packages = project.list_packages()
def list_packages():
for pkg in packages:
for ex in exclude:
if ex in pkg:
break
else:
yield pkg
project.list_packages = list_packages
project.list_modules = lambda: ''
project.set_property(
'distutils_use_setuptools', True
)
project.set_property(
'distutils_setup_keywords',
'Automation Framework'
)
project.set_property(
'distutils_classifiers', []
)
project.set_property(
'distutils_commands', ['bdist_wheel']
)