blob: e454da2e946704358b30365c856fc0811660a9db [file] [log] [blame]
herbertxue615af072018-05-24 09:39:17 +00001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15python_defaults {
16 name: "acloud_default",
Kevin Chengee6030f2018-06-26 10:55:30 -070017 pkg_path: "acloud",
herbertxue615af072018-05-24 09:39:17 +000018 version: {
19 py2: {
20 enabled: true,
21 embedded_launcher: false,
chojoyce2a82d302019-12-24 18:13:36 +080022 libs: [
23 "py-pyopenssl",
24 ]
herbertxue615af072018-05-24 09:39:17 +000025 },
26 py3: {
27 enabled: false,
28 embedded_launcher: false,
29 },
30 },
31}
32
33python_binary_host {
34 name: "acloud",
herbertxue00b241b2019-04-08 12:04:44 +080035 // Make acloud's built name to acloud-dev
36 stem: "acloud-dev",
herbertxue615af072018-05-24 09:39:17 +000037 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000038 main: "public/acloud_main.py",
39 srcs: [
40 "public/acloud_main.py",
Sam Chiu81bdc652018-06-29 18:45:08 +080041 "errors.py"
herbertxue615af072018-05-24 09:39:17 +000042 ],
43 data: [
44 "public/data/default.config",
cylan9af14692020-02-21 18:11:35 +080045 ":acloud_version",
herbertxue615af072018-05-24 09:39:17 +000046 ],
47 libs: [
Kevin Cheng3087af52018-08-13 13:26:50 -070048 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070049 "acloud_delete",
Jaewoong Jung2a029f02019-01-24 13:21:42 -080050 "acloud_reconnect",
herbertxue615af072018-05-24 09:39:17 +000051 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080052 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080053 "acloud_pull",
Sam Chiu5029a252018-11-06 20:54:13 +080054 "acloud_metrics",
herbertxue615af072018-05-24 09:39:17 +000055 "acloud_proto",
Kevin Cheng6001db32018-10-23 12:34:20 -070056 "acloud_public",
Kevin Chengee6030f2018-06-26 10:55:30 -070057 "acloud_setup",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070058 "py-apitools",
Kevin Cheng31e84292018-05-30 16:08:50 -070059 "py-dateutil",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070060 "py-google-api-python-client",
61 "py-oauth2client",
chojoyce92d884b2019-10-14 16:53:17 +080062 "py-six",
herbertxue615af072018-05-24 09:39:17 +000063 ],
Jaewoong Jung2a029f02019-01-24 13:21:42 -080064 dist: {
65 targets: ["droidcore"],
66 },
herbertxue615af072018-05-24 09:39:17 +000067}
68
Kevin Chengda4f07a2018-06-26 10:25:05 -070069python_test_host {
70 name: "acloud_test",
71 main: "acloud_test.py",
72 defaults: ["acloud_default"],
Kevin Cheng4fce0bc2018-08-13 11:51:34 -070073 data: [
74 "public/data/default.config",
75 ],
Kevin Chengda4f07a2018-06-26 10:25:05 -070076 srcs: [
77 "acloud_test.py",
Kevin Chengccfac9b2018-09-21 09:50:35 -070078 "errors.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070079 "public/*_test.py",
80 "public/actions/*_test.py",
81 "internal/lib/*_test.py",
Sam Chiue791f602019-05-03 15:18:10 +080082 "metrics/*.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070083 ],
84 libs: [
Kevin Cheng86d43c72018-08-30 10:59:14 -070085 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070086 "acloud_delete",
herbertxue61bfd972019-09-24 15:51:52 +080087 "acloud_reconnect",
Kevin Chengda4f07a2018-06-26 10:25:05 -070088 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080089 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080090 "acloud_pull",
Kevin Chengda4f07a2018-06-26 10:25:05 -070091 "acloud_proto",
Kevin Cheng86d43c72018-08-30 10:59:14 -070092 "acloud_public",
Sam Chiu4bb604a2018-10-05 18:29:10 +080093 "acloud_setup",
Sam Chiue791f602019-05-03 15:18:10 +080094 "asuite_cc_client",
Kevin Chengda4f07a2018-06-26 10:25:05 -070095 "py-apitools",
96 "py-dateutil",
97 "py-google-api-python-client",
Kevin Cheng60db1bc2018-09-24 12:20:25 -070098 "py-mock",
Kevin Chengda4f07a2018-06-26 10:25:05 -070099 "py-oauth2client",
100 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -0700101 test_config: "acloud_unittest.xml",
102 test_suites: ["general-tests"],
Kevin Chengda4f07a2018-06-26 10:25:05 -0700103}
104
105python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000106 name: "acloud_public",
107 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000108 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700109 "public/*.py",
110 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +0000111 ],
112 exclude_srcs: [
113 "public/*_test.py",
114 "public/actions/*_test.py",
115 "public/acloud_main.py",
116 ]
117}
118
Kevin Chengda4f07a2018-06-26 10:25:05 -0700119python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000120 name: "acloud_internal",
121 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000122 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700123 "internal/*.py",
124 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000125 ],
126 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000127 "internal/lib/*_test.py",
128 ]
129}
130
Kevin Chengda4f07a2018-06-26 10:25:05 -0700131python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000132 name: "acloud_proto",
133 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000134 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700135 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000136 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700137 proto: {
138 canonical_path_from_root: false,
139 },
herbertxue615af072018-05-24 09:39:17 +0000140}
Kevin Chengee6030f2018-06-26 10:55:30 -0700141
142python_library_host{
143 name: "acloud_setup",
144 defaults: ["acloud_default"],
145 srcs: [
146 "setup/*.py",
147 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800148 exclude_srcs: [
149 "setup/*_test.py",
150 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700151}
Kevin Cheng3087af52018-08-13 13:26:50 -0700152
153python_library_host{
154 name: "acloud_create",
155 defaults: ["acloud_default"],
156 srcs: [
157 "create/*.py",
158 ],
159}
Kevin Chengeb85e862018-10-09 15:35:13 -0700160
161python_library_host{
162 name: "acloud_delete",
163 defaults: ["acloud_default"],
164 srcs: [
165 "delete/*.py",
166 ],
167}
Kevin Cheng6001db32018-10-23 12:34:20 -0700168
169python_library_host{
Sam Chiu5029a252018-11-06 20:54:13 +0800170 name: "acloud_list",
171 defaults: ["acloud_default"],
172 srcs: [
173 "list/*.py",
174 ],
175}
176
177python_library_host{
cylan4569dca2018-11-02 12:12:53 +0800178 name: "acloud_reconnect",
179 defaults: ["acloud_default"],
180 srcs: [
181 "reconnect/*.py",
182 ],
183}
184
185python_library_host{
herbertxue61bfd972019-09-24 15:51:52 +0800186 name: "acloud_pull",
187 defaults: ["acloud_default"],
188 srcs: [
189 "pull/*.py",
190 ],
191}
192
193python_library_host{
Kevin Cheng6001db32018-10-23 12:34:20 -0700194 name: "acloud_metrics",
195 defaults: ["acloud_default"],
196 srcs: [
197 "metrics/*.py",
198 ],
199 libs: [
Sam Chiue791f602019-05-03 15:18:10 +0800200 "asuite_cc_client",
Kevin Cheng6001db32018-10-23 12:34:20 -0700201 "asuite_metrics",
202 ],
203}
cylan9af14692020-02-21 18:11:35 +0800204
205genrule {
206 name: "acloud_version",
207 tool_files: ["gen_version.sh"],
208 cmd: "$(location gen_version.sh) $(out)",
209 out: ["public/data/VERSION"],
210}
chojoycec0c0e0d2020-04-13 17:24:45 +0800211
212python_defaults {
213 // Make acloud's built name to acloud-py3-dev for python3.
214 name: "acloud_py3_default",
215 pkg_path: "acloud",
216 version: {
217 py2: {
218 enabled: false,
219 embedded_launcher: false,
220 },
221 py3: {
222 enabled: true,
223 embedded_launcher: false,
224 },
225 },
226}
227
228python_binary_host {
229 name: "acloud_py3",
230 stem: "acloud-py3-dev",
231 defaults: ["acloud_py3_default"],
232 main: "public/acloud_main.py",
233 srcs: [
234 "public/acloud_main.py",
235 "errors.py"
236 ],
237 data: [
238 "public/data/default.config",
239 ":acloud_version",
240 ],
241 libs: [
242 "acloud_create_py3",
243 "acloud_delete_py3",
244 "acloud_reconnect_py3",
245 "acloud_internal_py3",
246 "acloud_list_py3",
247 "acloud_pull_py3",
248 "acloud_metrics_py3",
249 "acloud_proto_py3",
250 "acloud_public_py3",
251 "acloud_setup_py3",
252 "py-apitools",
253 "py-dateutil",
254 "py-google-api-python-client",
255 "py-oauth2client",
256 "py-six",
257 ],
258 dist: {
259 targets: ["droidcore"],
260 },
261}
262
263python_test_host {
264 name: "acloud_test_py3",
265 main: "acloud_test.py",
266 defaults: ["acloud_py3_default"],
267 data: [
268 "public/data/default.config",
269 ],
270 srcs: [
271 "acloud_test.py",
272 "errors.py",
273 "public/*_test.py",
274 "public/actions/*_test.py",
275 "internal/lib/*_test.py",
276 "metrics/*.py",
277 ],
278 libs: [
279 "acloud_create_py3",
280 "acloud_delete_py3",
281 "acloud_reconnect_py3",
282 "acloud_internal_py3",
283 "acloud_list_py3",
284 "acloud_pull_py3",
285 "acloud_proto_py3",
286 "acloud_public_py3",
287 "acloud_setup_py3",
288 "asuite_cc_client",
289 "py-apitools",
290 "py-dateutil",
291 "py-google-api-python-client",
292 "py-mock",
293 "py-oauth2client",
294 ],
295 test_config: "acloud_unittest.xml",
296 test_suites: ["general-tests"],
297}
298
299python_library_host {
300 name: "acloud_public_py3",
301 defaults: ["acloud_py3_default"],
302 srcs: [
303 "public/*.py",
304 "public/actions/*.py",
305 ],
306 exclude_srcs: [
307 "public/*_test.py",
308 "public/actions/*_test.py",
309 "public/acloud_main.py",
310 ]
311}
312
313python_library_host {
314 name: "acloud_internal_py3",
315 defaults: ["acloud_py3_default"],
316 srcs: [
317 "internal/*.py",
318 "internal/lib/*.py",
319 ],
320 exclude_srcs: [
321 "internal/lib/*_test.py",
322 ]
323}
324
325python_library_host {
326 name: "acloud_proto_py3",
327 defaults: ["acloud_py3_default"],
328 srcs: [
329 "internal/proto/*.proto",
330 ],
331 proto: {
332 canonical_path_from_root: false,
333 },
334}
335
336python_library_host{
337 name: "acloud_setup_py3",
338 defaults: ["acloud_py3_default"],
339 srcs: [
340 "setup/*.py",
341 ],
342 exclude_srcs: [
343 "setup/*_test.py",
344 ],
345}
346
347python_library_host{
348 name: "acloud_create_py3",
349 defaults: ["acloud_py3_default"],
350 srcs: [
351 "create/*.py",
352 ],
353}
354
355python_library_host{
356 name: "acloud_delete_py3",
357 defaults: ["acloud_py3_default"],
358 srcs: [
359 "delete/*.py",
360 ],
361}
362
363python_library_host{
364 name: "acloud_list_py3",
365 defaults: ["acloud_py3_default"],
366 srcs: [
367 "list/*.py",
368 ],
369}
370
371python_library_host{
372 name: "acloud_reconnect_py3",
373 defaults: ["acloud_py3_default"],
374 srcs: [
375 "reconnect/*.py",
376 ],
377}
378
379python_library_host{
380 name: "acloud_pull_py3",
381 defaults: ["acloud_py3_default"],
382 srcs: [
383 "pull/*.py",
384 ],
385}
386
387python_library_host{
388 name: "acloud_metrics_py3",
389 defaults: ["acloud_py3_default"],
390 srcs: [
391 "metrics/*.py",
392 ],
393 libs: [
394 "asuite_cc_client",
395 "asuite_metrics",
396 ],
397}
398