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