blob: b211ee786b1fd420a2f633df1af1dad49384d4dd [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,
22 },
23 py3: {
24 enabled: false,
25 embedded_launcher: false,
26 },
27 },
28}
29
30python_binary_host {
31 name: "acloud",
herbertxue00b241b2019-04-08 12:04:44 +080032 // Make acloud's built name to acloud-dev
33 stem: "acloud-dev",
herbertxue615af072018-05-24 09:39:17 +000034 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000035 main: "public/acloud_main.py",
36 srcs: [
37 "public/acloud_main.py",
Sam Chiu81bdc652018-06-29 18:45:08 +080038 "errors.py"
herbertxue615af072018-05-24 09:39:17 +000039 ],
40 data: [
41 "public/data/default.config",
cylan9af14692020-02-21 18:11:35 +080042 ":acloud_version",
herbertxue615af072018-05-24 09:39:17 +000043 ],
44 libs: [
Kevin Cheng3087af52018-08-13 13:26:50 -070045 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070046 "acloud_delete",
Jaewoong Jung2a029f02019-01-24 13:21:42 -080047 "acloud_reconnect",
herbertxue615af072018-05-24 09:39:17 +000048 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080049 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080050 "acloud_pull",
Sam Chiu5029a252018-11-06 20:54:13 +080051 "acloud_metrics",
herbertxue615af072018-05-24 09:39:17 +000052 "acloud_proto",
Kevin Cheng6001db32018-10-23 12:34:20 -070053 "acloud_public",
Kevin Chengee6030f2018-06-26 10:55:30 -070054 "acloud_setup",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070055 "py-apitools",
Kevin Cheng31e84292018-05-30 16:08:50 -070056 "py-dateutil",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070057 "py-google-api-python-client",
58 "py-oauth2client",
chojoyce92d884b2019-10-14 16:53:17 +080059 "py-pyopenssl",
60 "py-six",
herbertxue615af072018-05-24 09:39:17 +000061 ],
Jaewoong Jung2a029f02019-01-24 13:21:42 -080062 dist: {
63 targets: ["droidcore"],
64 },
herbertxue615af072018-05-24 09:39:17 +000065}
66
Kevin Chengda4f07a2018-06-26 10:25:05 -070067python_test_host {
68 name: "acloud_test",
69 main: "acloud_test.py",
70 defaults: ["acloud_default"],
Kevin Cheng4fce0bc2018-08-13 11:51:34 -070071 data: [
72 "public/data/default.config",
73 ],
Kevin Chengda4f07a2018-06-26 10:25:05 -070074 srcs: [
75 "acloud_test.py",
Kevin Chengccfac9b2018-09-21 09:50:35 -070076 "errors.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070077 "public/*_test.py",
78 "public/actions/*_test.py",
79 "internal/lib/*_test.py",
Sam Chiue791f602019-05-03 15:18:10 +080080 "metrics/*.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070081 ],
82 libs: [
Kevin Cheng86d43c72018-08-30 10:59:14 -070083 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070084 "acloud_delete",
herbertxue61bfd972019-09-24 15:51:52 +080085 "acloud_reconnect",
Kevin Chengda4f07a2018-06-26 10:25:05 -070086 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080087 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080088 "acloud_pull",
Kevin Chengda4f07a2018-06-26 10:25:05 -070089 "acloud_proto",
Kevin Cheng86d43c72018-08-30 10:59:14 -070090 "acloud_public",
Sam Chiu4bb604a2018-10-05 18:29:10 +080091 "acloud_setup",
Sam Chiue791f602019-05-03 15:18:10 +080092 "asuite_cc_client",
Kevin Chengda4f07a2018-06-26 10:25:05 -070093 "py-apitools",
94 "py-dateutil",
95 "py-google-api-python-client",
Kevin Cheng60db1bc2018-09-24 12:20:25 -070096 "py-mock",
Kevin Chengda4f07a2018-06-26 10:25:05 -070097 "py-oauth2client",
98 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -070099 test_config: "acloud_unittest.xml",
100 test_suites: ["general-tests"],
Kevin Chengda4f07a2018-06-26 10:25:05 -0700101}
102
103python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000104 name: "acloud_public",
105 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000106 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700107 "public/*.py",
108 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +0000109 ],
110 exclude_srcs: [
111 "public/*_test.py",
112 "public/actions/*_test.py",
113 "public/acloud_main.py",
114 ]
115}
116
Kevin Chengda4f07a2018-06-26 10:25:05 -0700117python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000118 name: "acloud_internal",
119 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000120 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700121 "internal/*.py",
122 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000123 ],
124 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000125 "internal/lib/*_test.py",
126 ]
127}
128
Kevin Chengda4f07a2018-06-26 10:25:05 -0700129python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000130 name: "acloud_proto",
131 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000132 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700133 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000134 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700135 proto: {
136 canonical_path_from_root: false,
137 },
herbertxue615af072018-05-24 09:39:17 +0000138}
Kevin Chengee6030f2018-06-26 10:55:30 -0700139
140python_library_host{
141 name: "acloud_setup",
142 defaults: ["acloud_default"],
143 srcs: [
144 "setup/*.py",
145 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800146 exclude_srcs: [
147 "setup/*_test.py",
148 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700149}
Kevin Cheng3087af52018-08-13 13:26:50 -0700150
151python_library_host{
152 name: "acloud_create",
153 defaults: ["acloud_default"],
154 srcs: [
155 "create/*.py",
156 ],
157}
Kevin Chengeb85e862018-10-09 15:35:13 -0700158
159python_library_host{
160 name: "acloud_delete",
161 defaults: ["acloud_default"],
162 srcs: [
163 "delete/*.py",
164 ],
165}
Kevin Cheng6001db32018-10-23 12:34:20 -0700166
167python_library_host{
Sam Chiu5029a252018-11-06 20:54:13 +0800168 name: "acloud_list",
169 defaults: ["acloud_default"],
170 srcs: [
171 "list/*.py",
172 ],
173}
174
175python_library_host{
cylan4569dca2018-11-02 12:12:53 +0800176 name: "acloud_reconnect",
177 defaults: ["acloud_default"],
178 srcs: [
179 "reconnect/*.py",
180 ],
181}
182
183python_library_host{
herbertxue61bfd972019-09-24 15:51:52 +0800184 name: "acloud_pull",
185 defaults: ["acloud_default"],
186 srcs: [
187 "pull/*.py",
188 ],
189}
190
191python_library_host{
Kevin Cheng6001db32018-10-23 12:34:20 -0700192 name: "acloud_metrics",
193 defaults: ["acloud_default"],
194 srcs: [
195 "metrics/*.py",
196 ],
197 libs: [
Sam Chiue791f602019-05-03 15:18:10 +0800198 "asuite_cc_client",
Kevin Cheng6001db32018-10-23 12:34:20 -0700199 "asuite_metrics",
200 ],
201}
cylan9af14692020-02-21 18:11:35 +0800202
203genrule {
204 name: "acloud_version",
205 tool_files: ["gen_version.sh"],
206 cmd: "$(location gen_version.sh) $(out)",
207 out: ["public/data/VERSION"],
208}