| // Copyright (C) 2018 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| package { |
| default_applicable_licenses: ["tools_acloud_license"], |
| } |
| |
| // Added automatically by a large-scale-change |
| // http://go/android-license-faq |
| license { |
| name: "tools_acloud_license", |
| visibility: [":__subpackages__"], |
| license_kinds: [ |
| "SPDX-license-identifier-Apache-2.0", |
| ], |
| license_text: [ |
| "LICENSE", |
| ], |
| } |
| |
| python_defaults { |
| name: "acloud_default", |
| pkg_path: "acloud", |
| version: { |
| py2: { |
| enabled: false, |
| embedded_launcher: false, |
| libs: [ |
| "py-pyopenssl", |
| ] |
| }, |
| py3: { |
| enabled: true, |
| embedded_launcher: false, |
| }, |
| }, |
| } |
| |
| python_binary_host { |
| name: "acloud", |
| // Make acloud's built name to acloud-dev default build python3 binary. |
| stem: "acloud-dev", |
| defaults: ["acloud_default"], |
| main: "public/acloud_main.py", |
| srcs: [ |
| "public/acloud_main.py", |
| "errors.py" |
| ], |
| data: [ |
| "public/data/default.config", |
| ":acloud_version", |
| ], |
| libs: [ |
| "acloud_create", |
| "acloud_delete", |
| "acloud_reconnect", |
| "acloud_internal", |
| "acloud_list", |
| "acloud_pull", |
| "acloud_powerwash", |
| "acloud_metrics", |
| "acloud_proto", |
| "acloud_public", |
| "acloud_restart", |
| "acloud_setup", |
| "acloud_hostcleanup", |
| "py-apitools", |
| "py-dateutil", |
| "py-google-api-python-client", |
| "py-oauth2client", |
| "py-six", |
| ], |
| dist: { |
| targets: ["droidcore"], |
| }, |
| } |
| |
| python_test_host { |
| name: "acloud_test", |
| main: "acloud_test.py", |
| defaults: ["acloud_default"], |
| data: [ |
| "public/data/default.config", |
| ], |
| srcs: [ |
| "acloud_test.py", |
| "errors.py", |
| "public/*_test.py", |
| "public/actions/*_test.py", |
| "internal/lib/*_test.py", |
| "metrics/*.py", |
| ], |
| libs: [ |
| "acloud_create", |
| "acloud_delete", |
| "acloud_reconnect", |
| "acloud_internal", |
| "acloud_list", |
| "acloud_powerwash", |
| "acloud_public", |
| "acloud_pull", |
| "acloud_proto", |
| "acloud_restart", |
| "acloud_setup", |
| "acloud_hostcleanup", |
| "asuite_cc_client", |
| "py-apitools", |
| "py-dateutil", |
| "py-google-api-python-client", |
| "py-oauth2client", |
| ], |
| test_config: "acloud_unittest.xml", |
| test_suites: [ |
| "general-tests", |
| ], |
| test_options: { |
| unit_test: true, |
| } |
| } |
| |
| python_library_host { |
| name: "acloud_public", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "public/*.py", |
| "public/actions/*.py", |
| ], |
| exclude_srcs: [ |
| "public/*_test.py", |
| "public/actions/*_test.py", |
| "public/acloud_main.py", |
| ] |
| } |
| |
| python_library_host { |
| name: "acloud_internal", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "internal/*.py", |
| "internal/lib/*.py", |
| ], |
| exclude_srcs: [ |
| "internal/lib/*_test.py", |
| ] |
| } |
| |
| python_library_host { |
| name: "acloud_proto", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "internal/proto/*.proto", |
| ], |
| proto: { |
| canonical_path_from_root: false, |
| }, |
| } |
| |
| python_library_host{ |
| name: "acloud_setup", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "setup/*.py", |
| ], |
| exclude_srcs: [ |
| "setup/*_test.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_create", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "create/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_delete", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "delete/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_list", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "list/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_reconnect", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "reconnect/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_pull", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "pull/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_powerwash", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "powerwash/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_restart", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "restart/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_hostcleanup", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "hostcleanup/*.py", |
| ], |
| } |
| |
| python_library_host{ |
| name: "acloud_metrics", |
| defaults: ["acloud_default"], |
| srcs: [ |
| "metrics/*.py", |
| ], |
| libs: [ |
| "asuite_cc_client", |
| "asuite_metrics", |
| ], |
| } |
| |
| genrule { |
| name: "acloud_version", |
| tool_files: ["gen_version.sh"], |
| cmd: "$(location gen_version.sh) $(out)", |
| out: ["public/data/VERSION"], |
| } |