aboutsummaryrefslogtreecommitdiff
path: root/examples/bzlmod/entry_point/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bzlmod/entry_point/BUILD.bazel')
-rw-r--r--examples/bzlmod/entry_point/BUILD.bazel20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/bzlmod/entry_point/BUILD.bazel b/examples/bzlmod/entry_point/BUILD.bazel
new file mode 100644
index 0000000..f68552c
--- /dev/null
+++ b/examples/bzlmod/entry_point/BUILD.bazel
@@ -0,0 +1,20 @@
+load("@pip_39//:requirements.bzl", "entry_point")
+load("@rules_python//python:defs.bzl", "py_test")
+
+alias(
+ name = "yamllint",
+ actual = entry_point("yamllint"),
+)
+
+py_test(
+ name = "entry_point_test",
+ srcs = ["test_entry_point.py"],
+ data = [
+ ":yamllint",
+ ],
+ env = {
+ "YAMLLINT_ENTRY_POINT": "$(rlocationpath :yamllint)",
+ },
+ main = "test_entry_point.py",
+ deps = ["@rules_python//python/runfiles"],
+)