| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| """Package used to test that Python actions work properly.""" |
| |
| load("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS") |
| load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") |
| |
| py_library( |
| name = "lib", |
| srcs = ["lib.py"], |
| target_compatible_with = HOST_CONSTRAINTS, |
| ) |
| |
| py_binary( |
| name = "bin", |
| srcs = ["bin.py"], |
| target_compatible_with = HOST_CONSTRAINTS, |
| deps = [":lib"], |
| ) |
| |
| py_test( |
| name = "test", |
| srcs = ["test.py"], |
| target_compatible_with = HOST_CONSTRAINTS, |
| deps = [":lib"], |
| ) |
| |
| filegroup( |
| name = "srcs", |
| srcs = ["BUILD.bazel"] + glob(["**/*.py"]), |
| ) |
| |
| filegroup( |
| name = "hello_python", |
| testonly = True, |
| srcs = [ |
| ":bin", |
| ":lib", |
| ":test", |
| ], |
| visibility = ["//visibility:public"], |
| ) |