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
15python_defaults {
16    name: "acloud_default",
17    pkg_path: "acloud",
18    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",
32    // Make acloud's built name to acloud-dev
33    stem: "acloud-dev",
34    defaults: ["acloud_default"],
35    main: "public/acloud_main.py",
36    srcs: [
37        "public/acloud_main.py",
38        "errors.py"
39    ],
40    data: [
41        "public/data/default.config",
42    ],
43    libs: [
44        "acloud_create",
45        "acloud_delete",
46        "acloud_reconnect",
47        "acloud_internal",
48        "acloud_list",
49        "acloud_pull",
50        "acloud_metrics",
51        "acloud_proto",
52        "acloud_public",
53        "acloud_setup",
54        "py-apitools",
55        "py-dateutil",
56        "py-google-api-python-client",
57        "py-oauth2client",
58        "py-pyopenssl",
59        "py-six",
60    ],
61    dist: {
62        targets: ["droidcore"],
63    },
64}
65
66python_test_host {
67    name: "acloud_test",
68    main: "acloud_test.py",
69    defaults: ["acloud_default"],
70    data: [
71        "public/data/default.config",
72    ],
73    srcs: [
74        "acloud_test.py",
75        "errors.py",
76        "public/*_test.py",
77        "public/actions/*_test.py",
78        "internal/lib/*_test.py",
79        "metrics/*.py",
80    ],
81    libs: [
82        "acloud_create",
83        "acloud_delete",
84        "acloud_reconnect",
85        "acloud_internal",
86        "acloud_list",
87        "acloud_pull",
88        "acloud_proto",
89        "acloud_public",
90        "acloud_setup",
91        "asuite_cc_client",
92        "py-apitools",
93        "py-dateutil",
94        "py-google-api-python-client",
95        "py-mock",
96        "py-oauth2client",
97    ],
98    test_config: "acloud_unittest.xml",
99    test_suites: ["general-tests"],
100}
101
102python_library_host {
103    name: "acloud_public",
104    defaults: ["acloud_default"],
105    srcs: [
106        "public/*.py",
107        "public/actions/*.py",
108    ],
109    exclude_srcs: [
110        "public/*_test.py",
111        "public/actions/*_test.py",
112        "public/acloud_main.py",
113    ]
114}
115
116python_library_host {
117    name: "acloud_internal",
118    defaults: ["acloud_default"],
119    srcs: [
120        "internal/*.py",
121        "internal/lib/*.py",
122    ],
123    exclude_srcs: [
124        "internal/lib/*_test.py",
125    ]
126}
127
128python_library_host {
129    name: "acloud_proto",
130    defaults: ["acloud_default"],
131    srcs: [
132        "internal/proto/*.proto",
133    ],
134    proto: {
135        canonical_path_from_root: false,
136    },
137}
138
139python_library_host{
140    name: "acloud_setup",
141    defaults: ["acloud_default"],
142    srcs: [
143         "setup/*.py",
144    ],
145    exclude_srcs: [
146        "setup/*_test.py",
147    ],
148}
149
150python_library_host{
151    name: "acloud_create",
152    defaults: ["acloud_default"],
153    srcs: [
154         "create/*.py",
155    ],
156}
157
158python_library_host{
159    name: "acloud_delete",
160    defaults: ["acloud_default"],
161    srcs: [
162         "delete/*.py",
163    ],
164}
165
166python_library_host{
167    name: "acloud_list",
168    defaults: ["acloud_default"],
169    srcs: [
170         "list/*.py",
171    ],
172}
173
174python_library_host{
175    name: "acloud_reconnect",
176    defaults: ["acloud_default"],
177    srcs: [
178         "reconnect/*.py",
179    ],
180}
181
182python_library_host{
183    name: "acloud_pull",
184    defaults: ["acloud_default"],
185    srcs: [
186         "pull/*.py",
187    ],
188}
189
190python_library_host{
191    name: "acloud_metrics",
192    defaults: ["acloud_default"],
193    srcs: [
194         "metrics/*.py",
195    ],
196    libs: [
197         "asuite_cc_client",
198         "asuite_metrics",
199    ],
200}
201