blob: ec2c2c1637d677518675d164254192bed07015c5 [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
Bob Badour940bf242021-02-03 22:21:31 -080015package {
16 default_applicable_licenses: ["tools_acloud_license"],
17}
18
19// Added automatically by a large-scale-change
20// http://go/android-license-faq
21license {
22 name: "tools_acloud_license",
23 visibility: [":__subpackages__"],
24 license_kinds: [
25 "SPDX-license-identifier-Apache-2.0",
26 ],
27 license_text: [
28 "LICENSE",
29 ],
30}
31
herbertxue615af072018-05-24 09:39:17 +000032python_defaults {
33 name: "acloud_default",
Kevin Chengee6030f2018-06-26 10:55:30 -070034 pkg_path: "acloud",
herbertxue615af072018-05-24 09:39:17 +000035 version: {
36 py2: {
chojoycec5ee4a72020-07-23 23:32:25 +080037 enabled: false,
herbertxue615af072018-05-24 09:39:17 +000038 embedded_launcher: false,
chojoyce2a82d302019-12-24 18:13:36 +080039 libs: [
40 "py-pyopenssl",
41 ]
herbertxue615af072018-05-24 09:39:17 +000042 },
43 py3: {
chojoycec5ee4a72020-07-23 23:32:25 +080044 enabled: true,
herbertxue615af072018-05-24 09:39:17 +000045 embedded_launcher: false,
46 },
47 },
48}
49
50python_binary_host {
51 name: "acloud",
chojoycec5ee4a72020-07-23 23:32:25 +080052 // Make acloud's built name to acloud-dev default build python3 binary.
herbertxue00b241b2019-04-08 12:04:44 +080053 stem: "acloud-dev",
herbertxue615af072018-05-24 09:39:17 +000054 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000055 main: "public/acloud_main.py",
56 srcs: [
57 "public/acloud_main.py",
Sam Chiu81bdc652018-06-29 18:45:08 +080058 "errors.py"
herbertxue615af072018-05-24 09:39:17 +000059 ],
60 data: [
61 "public/data/default.config",
Roland Levillain3550f0e2020-09-08 19:05:25 +010062 ":acloud_version",
herbertxue615af072018-05-24 09:39:17 +000063 ],
64 libs: [
Kevin Cheng3087af52018-08-13 13:26:50 -070065 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070066 "acloud_delete",
Jaewoong Jung2a029f02019-01-24 13:21:42 -080067 "acloud_reconnect",
herbertxue615af072018-05-24 09:39:17 +000068 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080069 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080070 "acloud_pull",
herbertxue2ebd4142020-07-30 19:37:37 +080071 "acloud_powerwash",
Sam Chiu5029a252018-11-06 20:54:13 +080072 "acloud_metrics",
herbertxue615af072018-05-24 09:39:17 +000073 "acloud_proto",
Kevin Cheng6001db32018-10-23 12:34:20 -070074 "acloud_public",
herbertxue282e2a52021-01-13 19:49:05 +080075 "acloud_restart",
Kevin Chengee6030f2018-06-26 10:55:30 -070076 "acloud_setup",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070077 "py-apitools",
Kevin Cheng31e84292018-05-30 16:08:50 -070078 "py-dateutil",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070079 "py-google-api-python-client",
80 "py-oauth2client",
chojoyce92d884b2019-10-14 16:53:17 +080081 "py-six",
herbertxue615af072018-05-24 09:39:17 +000082 ],
Jaewoong Jung2a029f02019-01-24 13:21:42 -080083 dist: {
84 targets: ["droidcore"],
85 },
herbertxue615af072018-05-24 09:39:17 +000086}
87
Kevin Chengda4f07a2018-06-26 10:25:05 -070088python_test_host {
89 name: "acloud_test",
90 main: "acloud_test.py",
91 defaults: ["acloud_default"],
Kevin Cheng4fce0bc2018-08-13 11:51:34 -070092 data: [
93 "public/data/default.config",
94 ],
Kevin Chengda4f07a2018-06-26 10:25:05 -070095 srcs: [
96 "acloud_test.py",
Kevin Chengccfac9b2018-09-21 09:50:35 -070097 "errors.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070098 "public/*_test.py",
99 "public/actions/*_test.py",
100 "internal/lib/*_test.py",
Sam Chiue791f602019-05-03 15:18:10 +0800101 "metrics/*.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700102 ],
103 libs: [
Kevin Cheng86d43c72018-08-30 10:59:14 -0700104 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -0700105 "acloud_delete",
herbertxue61bfd972019-09-24 15:51:52 +0800106 "acloud_reconnect",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700107 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +0800108 "acloud_list",
herbertxue873c9562021-04-07 14:42:19 +0800109 "acloud_powerwash",
110 "acloud_public",
herbertxue61bfd972019-09-24 15:51:52 +0800111 "acloud_pull",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700112 "acloud_proto",
herbertxue282e2a52021-01-13 19:49:05 +0800113 "acloud_restart",
Sam Chiu4bb604a2018-10-05 18:29:10 +0800114 "acloud_setup",
Sam Chiue791f602019-05-03 15:18:10 +0800115 "asuite_cc_client",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700116 "py-apitools",
117 "py-dateutil",
118 "py-google-api-python-client",
119 "py-oauth2client",
120 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -0700121 test_config: "acloud_unittest.xml",
Dan Shi7f4cd092020-11-02 11:59:42 -0800122 test_suites: [
123 "general-tests",
Dan Shi7f4cd092020-11-02 11:59:42 -0800124 ],
Dan Shiee3af522020-11-17 21:03:13 -0800125 test_options: {
126 unit_test: true,
127 }
Kevin Chengda4f07a2018-06-26 10:25:05 -0700128}
129
130python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000131 name: "acloud_public",
132 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000133 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700134 "public/*.py",
135 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +0000136 ],
137 exclude_srcs: [
138 "public/*_test.py",
139 "public/actions/*_test.py",
140 "public/acloud_main.py",
141 ]
142}
143
Kevin Chengda4f07a2018-06-26 10:25:05 -0700144python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000145 name: "acloud_internal",
146 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000147 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700148 "internal/*.py",
149 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000150 ],
151 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000152 "internal/lib/*_test.py",
153 ]
154}
155
Kevin Chengda4f07a2018-06-26 10:25:05 -0700156python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000157 name: "acloud_proto",
158 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000159 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700160 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000161 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700162 proto: {
163 canonical_path_from_root: false,
164 },
herbertxue615af072018-05-24 09:39:17 +0000165}
Kevin Chengee6030f2018-06-26 10:55:30 -0700166
167python_library_host{
168 name: "acloud_setup",
169 defaults: ["acloud_default"],
170 srcs: [
171 "setup/*.py",
172 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800173 exclude_srcs: [
174 "setup/*_test.py",
175 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700176}
Kevin Cheng3087af52018-08-13 13:26:50 -0700177
178python_library_host{
179 name: "acloud_create",
180 defaults: ["acloud_default"],
181 srcs: [
182 "create/*.py",
183 ],
184}
Kevin Chengeb85e862018-10-09 15:35:13 -0700185
186python_library_host{
187 name: "acloud_delete",
188 defaults: ["acloud_default"],
189 srcs: [
190 "delete/*.py",
191 ],
192}
Kevin Cheng6001db32018-10-23 12:34:20 -0700193
194python_library_host{
Sam Chiu5029a252018-11-06 20:54:13 +0800195 name: "acloud_list",
196 defaults: ["acloud_default"],
197 srcs: [
198 "list/*.py",
199 ],
200}
201
202python_library_host{
cylan4569dca2018-11-02 12:12:53 +0800203 name: "acloud_reconnect",
204 defaults: ["acloud_default"],
205 srcs: [
206 "reconnect/*.py",
207 ],
208}
209
210python_library_host{
herbertxue61bfd972019-09-24 15:51:52 +0800211 name: "acloud_pull",
212 defaults: ["acloud_default"],
213 srcs: [
214 "pull/*.py",
215 ],
216}
217
218python_library_host{
herbertxue2ebd4142020-07-30 19:37:37 +0800219 name: "acloud_powerwash",
220 defaults: ["acloud_default"],
221 srcs: [
222 "powerwash/*.py",
223 ],
224}
225
226python_library_host{
herbertxue282e2a52021-01-13 19:49:05 +0800227 name: "acloud_restart",
228 defaults: ["acloud_default"],
229 srcs: [
230 "restart/*.py",
231 ],
232}
233
234python_library_host{
Kevin Cheng6001db32018-10-23 12:34:20 -0700235 name: "acloud_metrics",
236 defaults: ["acloud_default"],
237 srcs: [
238 "metrics/*.py",
239 ],
240 libs: [
Sam Chiue791f602019-05-03 15:18:10 +0800241 "asuite_cc_client",
Kevin Cheng6001db32018-10-23 12:34:20 -0700242 "asuite_metrics",
243 ],
244}
cylan9af14692020-02-21 18:11:35 +0800245
246genrule {
247 name: "acloud_version",
248 tool_files: ["gen_version.sh"],
249 cmd: "$(location gen_version.sh) $(out)",
250 out: ["public/data/VERSION"],
251}