blob: 843fcba752a141987189485ad1410dc91a63422e [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",
32 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000033 main: "public/acloud_main.py",
34 srcs: [
35 "public/acloud_main.py",
Sam Chiu81bdc652018-06-29 18:45:08 +080036 "errors.py"
herbertxue615af072018-05-24 09:39:17 +000037 ],
38 data: [
39 "public/data/default.config",
40 ],
41 libs: [
Kevin Cheng3087af52018-08-13 13:26:50 -070042 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070043 "acloud_delete",
herbertxue615af072018-05-24 09:39:17 +000044 "acloud_public",
45 "acloud_internal",
46 "acloud_proto",
Kevin Chengee6030f2018-06-26 10:55:30 -070047 "acloud_setup",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070048 "py-apitools",
Kevin Cheng31e84292018-05-30 16:08:50 -070049 "py-dateutil",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070050 "py-google-api-python-client",
51 "py-oauth2client",
herbertxue615af072018-05-24 09:39:17 +000052 ],
53}
54
Kevin Chengda4f07a2018-06-26 10:25:05 -070055python_test_host {
56 name: "acloud_test",
57 main: "acloud_test.py",
58 defaults: ["acloud_default"],
Kevin Cheng4fce0bc2018-08-13 11:51:34 -070059 data: [
60 "public/data/default.config",
61 ],
Kevin Chengda4f07a2018-06-26 10:25:05 -070062 srcs: [
63 "acloud_test.py",
Kevin Chengccfac9b2018-09-21 09:50:35 -070064 "errors.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070065 "public/*_test.py",
66 "public/actions/*_test.py",
67 "internal/lib/*_test.py",
68 ],
69 libs: [
Kevin Cheng86d43c72018-08-30 10:59:14 -070070 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070071 "acloud_delete",
Kevin Chengda4f07a2018-06-26 10:25:05 -070072 "acloud_internal",
73 "acloud_proto",
Kevin Cheng86d43c72018-08-30 10:59:14 -070074 "acloud_public",
Sam Chiu4bb604a2018-10-05 18:29:10 +080075 "acloud_setup",
Kevin Chengda4f07a2018-06-26 10:25:05 -070076 "py-apitools",
77 "py-dateutil",
78 "py-google-api-python-client",
Kevin Cheng60db1bc2018-09-24 12:20:25 -070079 "py-mock",
Kevin Chengda4f07a2018-06-26 10:25:05 -070080 "py-oauth2client",
81 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -070082 test_config: "acloud_unittest.xml",
83 test_suites: ["general-tests"],
Kevin Chengda4f07a2018-06-26 10:25:05 -070084}
85
86python_library_host {
herbertxue615af072018-05-24 09:39:17 +000087 name: "acloud_public",
88 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000089 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -070090 "public/*.py",
91 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +000092 ],
93 exclude_srcs: [
94 "public/*_test.py",
95 "public/actions/*_test.py",
96 "public/acloud_main.py",
97 ]
98}
99
Kevin Chengda4f07a2018-06-26 10:25:05 -0700100python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000101 name: "acloud_internal",
102 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000103 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700104 "internal/*.py",
105 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000106 ],
107 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000108 "internal/lib/*_test.py",
109 ]
110}
111
Kevin Chengda4f07a2018-06-26 10:25:05 -0700112python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000113 name: "acloud_proto",
114 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000115 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700116 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000117 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700118 proto: {
119 canonical_path_from_root: false,
120 },
herbertxue615af072018-05-24 09:39:17 +0000121}
Kevin Chengee6030f2018-06-26 10:55:30 -0700122
123python_library_host{
124 name: "acloud_setup",
125 defaults: ["acloud_default"],
126 srcs: [
127 "setup/*.py",
128 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800129 exclude_srcs: [
130 "setup/*_test.py",
131 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700132}
Kevin Cheng3087af52018-08-13 13:26:50 -0700133
134python_library_host{
135 name: "acloud_create",
136 defaults: ["acloud_default"],
137 srcs: [
138 "create/*.py",
139 ],
140}
Kevin Chengeb85e862018-10-09 15:35:13 -0700141
142python_library_host{
143 name: "acloud_delete",
144 defaults: ["acloud_default"],
145 srcs: [
146 "delete/*.py",
147 ],
148}