Skip to content

Commit e615b3f

Browse files
committed
Move files to src
1 parent 92b346c commit e615b3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+122
-162
lines changed

BUILD

Lines changed: 86 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -7,283 +7,242 @@ For full license text, see the LICENSE file in the repo root or https://opensour
77

88
python_version = "PY3"
99

10+
py_library(
11+
name = "pomgen_lib",
12+
srcs = glob(["src/pomupdate/*.py",
13+
"src/common/*.py",
14+
"src/config/*.py",
15+
"src/common/*.py",
16+
"src/crawl/*.py"]),
17+
data = ["src/config/pom_template.xml"],
18+
visibility = ["//misc:__pkg__",],
19+
)
1020

1121
py_binary(
1222
name = "pomgen",
13-
srcs = [":pomgen_files"],
23+
srcs = ["src/pomgen.py"],
24+
deps = [":pomgen_lib"],
1425
python_version = python_version,
1526
)
1627

1728
py_binary(
1829
name = "query",
19-
main = "query.py",
20-
srcs = [":pomgen_files"],
30+
srcs = ["src/query.py"],
31+
deps = [":pomgen_lib"],
2132
python_version = python_version,
2233
)
2334

2435
py_binary(
2536
name = "update",
26-
main = "update.py",
27-
srcs = [":pomgen_files"],
37+
srcs = ["src/update.py"],
38+
deps = [":pomgen_lib"],
2839
python_version = python_version,
2940
)
3041

31-
filegroup(
32-
name = "pomgen_files",
33-
srcs = glob(["*.py",
34-
"pomupdate/*.py",
35-
"common/*.py",
36-
"config/*.py",
37-
"common/*.py",
38-
"crawl/*.py"]),
39-
visibility = ["//misc:__subpackages__",],
40-
)
41-
42-
43-
4442
py_test(
4543
name = "argsupporttest",
46-
srcs = ["common/argsupport.py",
47-
"common/mdfiles.py",
48-
"common/logger.py",
49-
"common/os_util.py",
50-
"crawl/bazel.py",
51-
"crawl/dependency.py",
52-
"tests/argsupporttest.py"],
53-
imports = ["."],
44+
srcs = ["tests/argsupporttest.py"],
45+
deps = [":pomgen_lib"],
46+
imports = ["src"],
5447
size = "small",
5548
python_version = python_version,
5649
)
5750

5851
py_test(
5952
name = "artifactprocessortest",
60-
srcs = ["common/code.py",
61-
"common/logger.py",
62-
"common/mdfiles.py",
63-
"common/os_util.py",
64-
"common/pomgenmode.py",
65-
"common/version.py",
66-
"config/exclusions.py",
67-
"crawl/artifactprocessor.py",
68-
"crawl/buildpom.py",
69-
"crawl/git.py",
70-
"crawl/releasereason.py",
71-
"tests/artifactprocessortest.py"],
72-
imports = ["."],
53+
srcs = ["tests/artifactprocessortest.py"],
54+
deps = [":pomgen_lib"],
55+
imports = ["src"],
7356
size = "small",
7457
python_version = python_version,
7558
)
7659

7760
py_test(
7861
name = "bazeltest",
79-
srcs = ["common/mdfiles.py",
80-
"common/os_util.py",
81-
"common/logger.py",
82-
"crawl/bazel.py",
83-
"crawl/dependency.py",
84-
"tests/bazeltest.py"],
85-
imports = ["."],
62+
srcs = ["tests/bazeltest.py"],
63+
deps = [":pomgen_lib"],
64+
imports = ["src"],
8665
size = "small",
8766
python_version = python_version,
8867
)
8968

9069
py_test(
9170
name = "buildpomtest",
92-
srcs = ["common/code.py",
93-
"common/mdfiles.py",
94-
"common/pomgenmode.py",
95-
"common/version.py",
96-
"crawl/buildpom.py",
97-
"tests/buildpomtest.py"],
98-
imports = ["."],
71+
srcs = ["tests/buildpomtest.py"],
72+
deps = [":pomgen_lib"],
73+
imports = ["src"],
9974
size = "small",
10075
python_version = python_version,
10176
)
10277

10378
py_test(
10479
name = "buildpomupdatetest",
105-
srcs = ["common/code.py",
106-
"common/mdfiles.py",
107-
"common/os_util.py",
108-
"common/pomgenmode.py",
109-
"common/version.py",
110-
"common/version_increment_strategy.py",
111-
"config/exclusions.py",
112-
"crawl/buildpom.py",
113-
"crawl/git.py",
114-
"tests/buildpomupdatetest.py",
115-
"pomupdate/buildpomupdate.py"],
116-
imports = ["."],
80+
srcs = ["tests/buildpomupdatetest.py"],
81+
deps = [":pomgen_lib"],
82+
imports = ["src"],
11783
size = "small",
11884
python_version = python_version,
11985
)
12086

12187
py_test(
12288
name = "codetest",
123-
srcs = ["common/code.py",
124-
"tests/codetest.py"],
125-
imports = ["."],
89+
srcs = ["tests/codetest.py"],
90+
deps = [":pomgen_lib"],
91+
imports = ["src"],
12692
size = "small",
12793
python_version = python_version,
12894
)
12995

13096
py_test(
13197
name = "configtest",
132-
srcs = ["common/logger.py",
133-
"config/config.py",
134-
"config/exclusions.py",
135-
"tests/configtest.py"],
136-
imports = ["."],
98+
srcs = ["tests/configtest.py"],
99+
deps = [":pomgen_lib"],
100+
imports = ["src"],
137101
size = "small",
138102
python_version = python_version,
139103
)
140104

141105
py_test(
142106
name = "crawlertest",
143-
srcs = [":pomgen_files", "tests/crawlertest.py"],
144-
imports = ["."],
107+
srcs = ["tests/crawlertest.py"],
108+
deps = [":pomgen_lib"],
109+
imports = ["src"],
145110
size = "small",
146111
python_version = python_version,
147112
)
148113

149114
py_test(
150115
name = "crawlerunittest",
151-
srcs = [":pomgen_files", "tests/crawlerunittest.py"],
152-
imports = ["."],
116+
srcs = ["tests/crawlerunittest.py"],
117+
deps = [":pomgen_lib"],
118+
imports = ["src"],
153119
size = "small",
154120
python_version = python_version,
155121
)
156122

157123
py_test(
158124
name = "crawlertest_misc",
159-
srcs = [":pomgen_files", "tests/crawlertest_misc.py"],
160-
imports = ["."],
125+
srcs = ["tests/crawlertest_misc.py"],
126+
deps = [":pomgen_lib"],
127+
imports = ["src"],
161128
size = "small",
162129
python_version = python_version,
163130
)
164131

165132
py_test(
166133
name = "dependencytest",
167-
srcs = ["common/code.py",
168-
"common/logger.py",
169-
"common/mdfiles.py",
170-
"common/pomgenmode.py",
171-
"common/version.py",
172-
"crawl/buildpom.py",
173-
"crawl/dependency.py",
174-
"tests/dependencytest.py"],
175-
imports = ["."],
134+
srcs = ["tests/dependencytest.py"],
135+
deps = [":pomgen_lib"],
136+
imports = ["src"],
176137
size = "small",
177138
python_version = python_version,
178139
)
179140

180141
py_test(
181142
name = "dependencymdtest",
182-
srcs = ["common/code.py",
183-
"common/mdfiles.py",
184-
"common/pomgenmode.py",
185-
"common/version.py",
186-
"crawl/buildpom.py",
187-
"crawl/dependency.py",
188-
"crawl/dependencymd.py",
189-
"tests/dependencymdtest.py"],
190-
imports = ["."],
143+
srcs = ["tests/dependencymdtest.py"],
144+
deps = [":pomgen_lib"],
145+
imports = ["src"],
191146
size = "small",
192147
python_version = python_version,
193148
)
194149

195150
py_test(
196151
name = "instancequerytest",
197-
srcs = ["common/instancequery.py",
198-
"tests/instancequerytest.py"],
199-
imports = ["."],
152+
srcs = ["tests/instancequerytest.py"],
153+
deps = [":pomgen_lib"],
154+
imports = ["src"],
200155
size = "small",
201156
python_version = python_version,
202157
)
203158

204159
py_test(
205160
name = "libaggregatortest",
206-
srcs = [":pomgen_files",
207-
"tests/libaggregatortest.py"],
208-
imports = ["."],
161+
srcs = ["tests/libaggregatortest.py"],
162+
deps = [":pomgen_lib"],
163+
imports = ["src"],
209164
size = "small",
210165
python_version = python_version,
211166
)
212167

213168
py_test(
214169
name = "maveninstallinfotest",
215-
srcs = ["common/maveninstallinfo.py", "tests/maveninstallinfotest.py",],
216-
imports = ["."],
170+
srcs = ["tests/maveninstallinfotest.py",],
171+
deps = [":pomgen_lib"],
172+
imports = ["src"],
217173
size = "small",
218174
python_version = python_version,
219175
)
220176

221177
py_test(
222178
name = "overridefileinfotest",
223-
srcs = ["common/overridefileinfo.py", "tests/overridefileinfotest.py",],
224-
imports = ["."],
179+
srcs = ["tests/overridefileinfotest.py",],
180+
deps = [":pomgen_lib"],
181+
imports = ["src"],
225182
size = "small",
226183
python_version = python_version,
227184
)
228185

229186
py_test(
230187
name = "mdfilestest",
231-
srcs = ["common/mdfiles.py", "tests/mdfilestest.py",],
232-
imports = ["."],
188+
srcs = ["tests/mdfilestest.py",],
189+
deps = [":pomgen_lib"],
190+
imports = ["src"],
233191
size = "small",
234192
python_version = python_version,
235193
)
236194

237195
py_test(
238196
name = "pomgentest",
239-
srcs = [":pomgen_files", "tests/pomgentest.py"],
240-
imports = ["."],
197+
srcs = ["src/pomgen.py", "tests/pomgentest.py"],
198+
deps = [":pomgen_lib"],
199+
imports = ["src"],
241200
size = "small",
242201
python_version = python_version,
243202
)
244203

245204
py_test(
246205
name = "pomtest",
247-
srcs = [":pomgen_files",
248-
"tests/pomtest.py"],
249-
imports = ["."],
206+
srcs = ["tests/pomtest.py"],
207+
deps = [":pomgen_lib"],
208+
imports = ["src"],
250209
size = "small",
251210
python_version = python_version,
252211
)
253212

254213
py_test(
255214
name = "pomparsertest",
256-
srcs = ["common/logger.py",
257-
"crawl/dependency.py",
258-
"crawl/pomparser.py",
259-
"tests/pomparsertest.py"],
260-
imports = ["."],
215+
srcs = ["tests/pomparsertest.py"],
216+
deps = [":pomgen_lib"],
217+
imports = ["src"],
261218
size = "small",
262219
python_version = python_version,
263220
)
264221

265222
py_test(
266223
name = "workspacetest",
267-
srcs = [":pomgen_files",
268-
"tests/workspacetest.py"],
269-
imports = ["."],
224+
srcs = ["tests/workspacetest.py"],
225+
deps = [":pomgen_lib"],
226+
imports = ["src"],
270227
size = "small",
271228
python_version = python_version,
272229
)
273230

274231
py_test(
275232
name = "versiontest",
276-
srcs = ["common/code.py", "common/version.py", "tests/versiontest.py"],
277-
imports = ["."],
233+
234+
srcs = ["tests/versiontest.py"],
235+
deps = [":pomgen_lib"],
236+
imports = ["src"],
278237
size = "small",
279238
python_version = python_version,
280239
)
281240

282241
py_test(
283242
name = "version_increment_strategy_test",
284-
srcs = ["common/version_increment_strategy.py",
285-
"tests/version_increment_strategy_test.py"],
286-
imports = ["."],
243+
srcs = ["tests/version_increment_strategy_test.py"],
244+
deps = [":pomgen_lib"],
245+
imports = ["src"],
287246
size = "small",
288247
python_version = python_version,
289248
)

0 commit comments

Comments
 (0)