• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
15package {
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
32python_defaults {
33    name: "acloud_default",
34    pkg_path: "acloud",
35    version: {
36        py2: {
37            enabled: false,
38            embedded_launcher: false,
39            libs: [
40                "py-pyopenssl",
41            ]
42        },
43        py3: {
44            enabled: true,
45            embedded_launcher: false,
46        },
47    },
48}
49
50python_binary_host {
51    name: "acloud",
52    // Make acloud's built name to acloud-dev default build python3 binary.
53    stem: "acloud-dev",
54    defaults: ["acloud_default"],
55    main: "public/acloud_main.py",
56    srcs: [
57        "public/acloud_main.py",
58        "errors.py"
59    ],
60    data: [
61        "public/data/default.config",
62        ":acloud_version",
63    ],
64    libs: [
65        "acloud_create",
66        "acloud_delete",
67        "acloud_reconnect",
68        "acloud_internal",
69        "acloud_list",
70        "acloud_pull",
71        "acloud_powerwash",
72        "acloud_metrics",
73        "acloud_proto",
74        "acloud_public",
75        "acloud_restart",
76        "acloud_setup",
77        "py-apitools",
78        "py-dateutil",
79        "py-google-api-python-client",
80        "py-oauth2client",
81        "py-six",
82    ],
83    dist: {
84        targets: ["droidcore"],
85    },
86}
87
88python_test_host {
89    name: "acloud_test",
90    main: "acloud_test.py",
91    defaults: ["acloud_default"],
92    data: [
93        "public/data/default.config",
94    ],
95    srcs: [
96        "acloud_test.py",
97        "errors.py",
98        "public/*_test.py",
99        "public/actions/*_test.py",
100        "internal/lib/*_test.py",
101        "metrics/*.py",
102    ],
103    libs: [
104        "acloud_create",
105        "acloud_delete",
106        "acloud_reconnect",
107        "acloud_internal",
108        "acloud_list",
109        "acloud_powerwash",
110        "acloud_public",
111        "acloud_pull",
112        "acloud_proto",
113        "acloud_restart",
114        "acloud_setup",
115        "asuite_cc_client",
116        "py-apitools",
117        "py-dateutil",
118        "py-google-api-python-client",
119        "py-oauth2client",
120    ],
121    test_config: "acloud_unittest.xml",
122    test_suites: [
123        "general-tests",
124    ],
125    test_options: {
126        unit_test: true,
127    }
128}
129
130python_library_host {
131    name: "acloud_public",
132    defaults: ["acloud_default"],
133    srcs: [
134        "public/*.py",
135        "public/actions/*.py",
136    ],
137    exclude_srcs: [
138        "public/*_test.py",
139        "public/actions/*_test.py",
140        "public/acloud_main.py",
141    ]
142}
143
144python_library_host {
145    name: "acloud_internal",
146    defaults: ["acloud_default"],
147    srcs: [
148        "internal/*.py",
149        "internal/lib/*.py",
150    ],
151    exclude_srcs: [
152        "internal/lib/*_test.py",
153    ]
154}
155
156python_library_host {
157    name: "acloud_proto",
158    defaults: ["acloud_default"],
159    srcs: [
160        "internal/proto/*.proto",
161    ],
162    proto: {
163        canonical_path_from_root: false,
164    },
165}
166
167python_library_host{
168    name: "acloud_setup",
169    defaults: ["acloud_default"],
170    srcs: [
171         "setup/*.py",
172    ],
173    exclude_srcs: [
174        "setup/*_test.py",
175    ],
176}
177
178python_library_host{
179    name: "acloud_create",
180    defaults: ["acloud_default"],
181    srcs: [
182         "create/*.py",
183    ],
184}
185
186python_library_host{
187    name: "acloud_delete",
188    defaults: ["acloud_default"],
189    srcs: [
190         "delete/*.py",
191    ],
192}
193
194python_library_host{
195    name: "acloud_list",
196    defaults: ["acloud_default"],
197    srcs: [
198         "list/*.py",
199    ],
200}
201
202python_library_host{
203    name: "acloud_reconnect",
204    defaults: ["acloud_default"],
205    srcs: [
206         "reconnect/*.py",
207    ],
208}
209
210python_library_host{
211    name: "acloud_pull",
212    defaults: ["acloud_default"],
213    srcs: [
214         "pull/*.py",
215    ],
216}
217
218python_library_host{
219    name: "acloud_powerwash",
220    defaults: ["acloud_default"],
221    srcs: [
222         "powerwash/*.py",
223    ],
224}
225
226python_library_host{
227    name: "acloud_restart",
228    defaults: ["acloud_default"],
229    srcs: [
230         "restart/*.py",
231    ],
232}
233
234python_library_host{
235    name: "acloud_metrics",
236    defaults: ["acloud_default"],
237    srcs: [
238         "metrics/*.py",
239    ],
240    libs: [
241         "asuite_cc_client",
242         "asuite_metrics",
243    ],
244}
245
246genrule {
247    name: "acloud_version",
248    tool_files: ["gen_version.sh"],
249    cmd: "$(location gen_version.sh) $(out)",
250    out: ["public/data/VERSION"],
251}
252