blob: b0ab7d48f80daa8922c293113c26c7d68bbd3b44 [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",
herbertxue61bfd972019-09-24 15:51:52 +0800109 "acloud_pull",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700110 "acloud_proto",
Kevin Cheng86d43c72018-08-30 10:59:14 -0700111 "acloud_public",
herbertxue282e2a52021-01-13 19:49:05 +0800112 "acloud_restart",
Sam Chiu4bb604a2018-10-05 18:29:10 +0800113 "acloud_setup",
Sam Chiue791f602019-05-03 15:18:10 +0800114 "asuite_cc_client",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700115 "py-apitools",
116 "py-dateutil",
117 "py-google-api-python-client",
118 "py-oauth2client",
119 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -0700120 test_config: "acloud_unittest.xml",
Dan Shi7f4cd092020-11-02 11:59:42 -0800121 test_suites: [
122 "general-tests",
Dan Shi7f4cd092020-11-02 11:59:42 -0800123 ],
Dan Shiee3af522020-11-17 21:03:13 -0800124 test_options: {
125 unit_test: true,
126 }
Kevin Chengda4f07a2018-06-26 10:25:05 -0700127}
128
129python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000130 name: "acloud_public",
131 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000132 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700133 "public/*.py",
134 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +0000135 ],
136 exclude_srcs: [
137 "public/*_test.py",
138 "public/actions/*_test.py",
139 "public/acloud_main.py",
140 ]
141}
142
Kevin Chengda4f07a2018-06-26 10:25:05 -0700143python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000144 name: "acloud_internal",
145 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000146 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700147 "internal/*.py",
148 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000149 ],
150 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000151 "internal/lib/*_test.py",
152 ]
153}
154
Kevin Chengda4f07a2018-06-26 10:25:05 -0700155python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000156 name: "acloud_proto",
157 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000158 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700159 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000160 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700161 proto: {
162 canonical_path_from_root: false,
163 },
herbertxue615af072018-05-24 09:39:17 +0000164}
Kevin Chengee6030f2018-06-26 10:55:30 -0700165
166python_library_host{
167 name: "acloud_setup",
168 defaults: ["acloud_default"],
169 srcs: [
170 "setup/*.py",
171 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800172 exclude_srcs: [
173 "setup/*_test.py",
174 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700175}
Kevin Cheng3087af52018-08-13 13:26:50 -0700176
177python_library_host{
178 name: "acloud_create",
179 defaults: ["acloud_default"],
180 srcs: [
181 "create/*.py",
182 ],
183}
Kevin Chengeb85e862018-10-09 15:35:13 -0700184
185python_library_host{
186 name: "acloud_delete",
187 defaults: ["acloud_default"],
188 srcs: [
189 "delete/*.py",
190 ],
191}
Kevin Cheng6001db32018-10-23 12:34:20 -0700192
193python_library_host{
Sam Chiu5029a252018-11-06 20:54:13 +0800194 name: "acloud_list",
195 defaults: ["acloud_default"],
196 srcs: [
197 "list/*.py",
198 ],
199}
200
201python_library_host{
cylan4569dca2018-11-02 12:12:53 +0800202 name: "acloud_reconnect",
203 defaults: ["acloud_default"],
204 srcs: [
205 "reconnect/*.py",
206 ],
207}
208
209python_library_host{
herbertxue61bfd972019-09-24 15:51:52 +0800210 name: "acloud_pull",
211 defaults: ["acloud_default"],
212 srcs: [
213 "pull/*.py",
214 ],
215}
216
217python_library_host{
herbertxue2ebd4142020-07-30 19:37:37 +0800218 name: "acloud_powerwash",
219 defaults: ["acloud_default"],
220 srcs: [
221 "powerwash/*.py",
222 ],
223}
224
225python_library_host{
herbertxue282e2a52021-01-13 19:49:05 +0800226 name: "acloud_restart",
227 defaults: ["acloud_default"],
228 srcs: [
229 "restart/*.py",
230 ],
231}
232
233python_library_host{
Kevin Cheng6001db32018-10-23 12:34:20 -0700234 name: "acloud_metrics",
235 defaults: ["acloud_default"],
236 srcs: [
237 "metrics/*.py",
238 ],
239 libs: [
Sam Chiue791f602019-05-03 15:18:10 +0800240 "asuite_cc_client",
Kevin Cheng6001db32018-10-23 12:34:20 -0700241 "asuite_metrics",
242 ],
243}
cylan9af14692020-02-21 18:11:35 +0800244
245genrule {
246 name: "acloud_version",
247 tool_files: ["gen_version.sh"],
248 cmd: "$(location gen_version.sh) $(out)",
249 out: ["public/data/VERSION"],
250}