Skip to content

Instantly share code, notes, and snippets.

@layus
Created February 18, 2025 05:05
Show Gist options
  • Save layus/e606f69c84ba0ef20941ed64096aebbe to your computer and use it in GitHub Desktop.
Save layus/e606f69c84ba0ef20941ed64096aebbe to your computer and use it in GitHub Desktop.
diff --git a/python/private/py_binary_rule.bzl b/python/private/py_binary_rule.bzl
index 9ce0726c..9268b1cb 100644
--- a/python/private/py_binary_rule.bzl
+++ b/python/private/py_binary_rule.bzl
@@ -49,4 +49,5 @@ py_binary = create_executable_rule(
implementation = _py_binary_impl,
attrs = dicts.add(AGNOSTIC_BINARY_ATTRS, _PY_TEST_ATTRS),
executable = True,
+ provides = [PyInfo],
)
diff --git a/python/private/py_library_rule.bzl b/python/private/py_library_rule.bzl
index ed647161..e9825e63 100644
--- a/python/private/py_library_rule.bzl
+++ b/python/private/py_library_rule.bzl
@@ -29,4 +29,5 @@ def _py_library_impl_with_semantics(ctx):
py_library = create_py_library_rule(
implementation = _py_library_impl_with_semantics,
+ provides = [PyInfo],
)
diff --git a/python/private/py_test_rule.bzl b/python/private/py_test_rule.bzl
index 64d5f21f..a7ad2701 100644
--- a/python/private/py_test_rule.bzl
+++ b/python/private/py_test_rule.bzl
@@ -52,4 +52,5 @@ py_test = create_executable_rule(
implementation = _py_test_impl,
attrs = dicts.add(AGNOSTIC_TEST_ATTRS, _BAZEL_PY_TEST_ATTRS),
test = True,
+ provides = [PyInfo],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment