10000 feat: add bzl_library for proto.bzl (#1116) · jml-derek/rules_python@3aa221f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3aa221f

Browse files
authored
feat: add bzl_library for proto.bzl (bazel-contrib#1116)
This is mostly so Google internal tooling can find the complete deps, but also as a best practice for consumption by other rules and tools.
1 parent 1c5b92b commit 3aa221f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

python/BUILD.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ bzl_library(
5353
],
5454
)
5555

56+
bzl_library(
57+
name = "proto_bzl",
58+
srcs = [
59+
"proto.bzl",
60+
],
61+
visibility = ["//visibility:public"],
62+
deps = [
63+
"//python/private/proto:py_proto_library_bzl",
64+
],
65+
)
66+
5667
# Filegroup of bzl files that can be used by downstream rules for documentation generation
5768
filegroup(
5869
name = "bzl",

python/private/proto/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1516
load("@rules_proto//proto:defs.bzl", "proto_lang_toolchain")
1617

1718
package(default_visibility = ["//visibility:public"])
@@ -24,6 +25,16 @@ filegroup(
2425
visibility = ["//python/private:__pkg__"],
2526
)
2627

28+
bzl_library(
29+
name = "py_proto_library_bzl",
30+
srcs = ["py_proto_library.bzl"],
31+
visibility = ["//python:__pkg__"],
32+
deps = [
33+
"//python:defs_bzl",
34+
"@rules_proto//proto:defs",
35+
],
36+
)
37+
2738
proto_lang_toolchain(
2839
name = "python_toolchain",
2940
command_line = "--python_out=%s",

0 commit comments

Comments
 (0)
0