herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 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 | |
| 15 | python_defaults { |
| 16 | name: "acloud_default", |
Kevin Cheng | ee6030f | 2018-06-26 10:55:30 -0700 | [diff] [blame] | 17 | pkg_path: "acloud", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 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 | |
| 30 | python_binary_host { |
| 31 | name: "acloud", |
| 32 | defaults: ["acloud_default"], |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 33 | main: "public/acloud_main.py", |
| 34 | srcs: [ |
| 35 | "public/acloud_main.py", |
Sam Chiu | 81bdc65 | 2018-06-29 18:45:08 +0800 | [diff] [blame] | 36 | "errors.py" |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 37 | ], |
| 38 | data: [ |
| 39 | "public/data/default.config", |
| 40 | ], |
| 41 | libs: [ |
Kevin Cheng | 3087af5 | 2018-08-13 13:26:50 -0700 | [diff] [blame] | 42 | "acloud_create", |
Kevin Cheng | eb85e86 | 2018-10-09 15:35:13 -0700 | [diff] [blame] | 43 | "acloud_delete", |
cylan | 4569dca | 2018-11-02 12:12:53 +0800 | [diff] [blame] | 44 | "acloud_reconnect", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 45 | "acloud_internal", |
Sam Chiu | 5029a25 | 2018-11-06 20:54:13 +0800 | [diff] [blame] | 46 | "acloud_list", |
| 47 | "acloud_metrics", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 48 | "acloud_proto", |
Kevin Cheng | 6001db3 | 2018-10-23 12:34:20 -0700 | [diff] [blame] | 49 | "acloud_public", |
Kevin Cheng | ee6030f | 2018-06-26 10:55:30 -0700 | [diff] [blame] | 50 | "acloud_setup", |
Kevin Cheng | 7639d5f | 2018-06-14 13:44:46 -0700 | [diff] [blame] | 51 | "py-apitools", |
Kevin Cheng | 31e8429 | 2018-05-30 16:08:50 -0700 | [diff] [blame] | 52 | "py-dateutil", |
Kevin Cheng | 7639d5f | 2018-06-14 13:44:46 -0700 | [diff] [blame] | 53 | "py-google-api-python-client", |
| 54 | "py-oauth2client", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 55 | ], |
| 56 | } |
| 57 | |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 58 | python_test_host { |
| 59 | name: "acloud_test", |
| 60 | main: "acloud_test.py", |
| 61 | defaults: ["acloud_default"], |
Kevin Cheng | 4fce0bc | 2018-08-13 11:51:34 -0700 | [diff] [blame] | 62 | data: [ |
| 63 | "public/data/default.config", |
| 64 | ], |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 65 | srcs: [ |
| 66 | "acloud_test.py", |
Kevin Cheng | ccfac9b | 2018-09-21 09:50:35 -0700 | [diff] [blame] | 67 | "errors.py", |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 68 | "public/*_test.py", |
| 69 | "public/actions/*_test.py", |
| 70 | "internal/lib/*_test.py", |
| 71 | ], |
| 72 | libs: [ |
Kevin Cheng | 86d43c7 | 2018-08-30 10:59:14 -0700 | [diff] [blame] | 73 | "acloud_create", |
Kevin Cheng | eb85e86 | 2018-10-09 15:35:13 -0700 | [diff] [blame] | 74 | "acloud_delete", |
cylan | 4569dca | 2018-11-02 12:12:53 +0800 | [diff] [blame] | 75 | "acloud_reconnect", |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 76 | "acloud_internal", |
Sam Chiu | 5029a25 | 2018-11-06 20:54:13 +0800 | [diff] [blame] | 77 | "acloud_list", |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 78 | "acloud_proto", |
Kevin Cheng | 86d43c7 | 2018-08-30 10:59:14 -0700 | [diff] [blame] | 79 | "acloud_public", |
Sam Chiu | 4bb604a | 2018-10-05 18:29:10 +0800 | [diff] [blame] | 80 | "acloud_setup", |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 81 | "py-apitools", |
| 82 | "py-dateutil", |
| 83 | "py-google-api-python-client", |
Kevin Cheng | 60db1bc | 2018-09-24 12:20:25 -0700 | [diff] [blame] | 84 | "py-mock", |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 85 | "py-oauth2client", |
| 86 | ], |
Kevin Cheng | cecb7fe | 2018-10-02 10:40:18 -0700 | [diff] [blame] | 87 | test_config: "acloud_unittest.xml", |
| 88 | test_suites: ["general-tests"], |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 89 | } |
| 90 | |
| 91 | python_library_host { |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 92 | name: "acloud_public", |
| 93 | defaults: ["acloud_default"], |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 94 | srcs: [ |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 95 | "public/*.py", |
| 96 | "public/actions/*.py", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 97 | ], |
| 98 | exclude_srcs: [ |
| 99 | "public/*_test.py", |
| 100 | "public/actions/*_test.py", |
| 101 | "public/acloud_main.py", |
| 102 | ] |
| 103 | } |
| 104 | |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 105 | python_library_host { |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 106 | name: "acloud_internal", |
| 107 | defaults: ["acloud_default"], |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 108 | srcs: [ |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 109 | "internal/*.py", |
| 110 | "internal/lib/*.py", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 111 | ], |
| 112 | exclude_srcs: [ |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 113 | "internal/lib/*_test.py", |
| 114 | ] |
| 115 | } |
| 116 | |
Kevin Cheng | da4f07a | 2018-06-26 10:25:05 -0700 | [diff] [blame] | 117 | python_library_host { |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 118 | name: "acloud_proto", |
| 119 | defaults: ["acloud_default"], |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 120 | srcs: [ |
Kevin Cheng | 8131d75 | 2018-06-06 14:38:43 -0700 | [diff] [blame] | 121 | "internal/proto/*.proto", |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 122 | ], |
Kevin Cheng | 8131d75 | 2018-06-06 14:38:43 -0700 | [diff] [blame] | 123 | proto: { |
| 124 | canonical_path_from_root: false, |
| 125 | }, |
herbertxue | 615af07 | 2018-05-24 09:39:17 +0000 | [diff] [blame] | 126 | } |
Kevin Cheng | ee6030f | 2018-06-26 10:55:30 -0700 | [diff] [blame] | 127 | |
| 128 | python_library_host{ |
| 129 | name: "acloud_setup", |
| 130 | defaults: ["acloud_default"], |
| 131 | srcs: [ |
| 132 | "setup/*.py", |
| 133 | ], |
Sam Chiu | 81bdc65 | 2018-06-29 18:45:08 +0800 | [diff] [blame] | 134 | exclude_srcs: [ |
| 135 | "setup/*_test.py", |
| 136 | ], |
Kevin Cheng | ee6030f | 2018-06-26 10:55:30 -0700 | [diff] [blame] | 137 | } |
Kevin Cheng | 3087af5 | 2018-08-13 13:26:50 -0700 | [diff] [blame] | 138 | |
| 139 | python_library_host{ |
| 140 | name: "acloud_create", |
| 141 | defaults: ["acloud_default"], |
| 142 | srcs: [ |
| 143 | "create/*.py", |
| 144 | ], |
| 145 | } |
Kevin Cheng | eb85e86 | 2018-10-09 15:35:13 -0700 | [diff] [blame] | 146 | |
| 147 | python_library_host{ |
| 148 | name: "acloud_delete", |
| 149 | defaults: ["acloud_default"], |
| 150 | srcs: [ |
| 151 | "delete/*.py", |
| 152 | ], |
| 153 | } |
Kevin Cheng | 6001db3 | 2018-10-23 12:34:20 -0700 | [diff] [blame] | 154 | |
| 155 | python_library_host{ |
Sam Chiu | 5029a25 | 2018-11-06 20:54:13 +0800 | [diff] [blame] | 156 | name: "acloud_list", |
| 157 | defaults: ["acloud_default"], |
| 158 | srcs: [ |
| 159 | "list/*.py", |
| 160 | ], |
| 161 | } |
| 162 | |
| 163 | python_library_host{ |
cylan | 4569dca | 2018-11-02 12:12:53 +0800 | [diff] [blame] | 164 | name: "acloud_reconnect", |
| 165 | defaults: ["acloud_default"], |
| 166 | srcs: [ |
| 167 | "reconnect/*.py", |
| 168 | ], |
| 169 | } |
| 170 | |
| 171 | python_library_host{ |
Kevin Cheng | 6001db3 | 2018-10-23 12:34:20 -0700 | [diff] [blame] | 172 | name: "acloud_metrics", |
| 173 | defaults: ["acloud_default"], |
| 174 | srcs: [ |
| 175 | "metrics/*.py", |
| 176 | ], |
| 177 | libs: [ |
| 178 | "asuite_metrics", |
| 179 | ], |
| 180 | } |