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