Skip to content

Commit 564f9ec

Browse files
committed
feat: re-enable Python example of using pre-built protoc
1 parent 56b554d commit 564f9ec

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

examples/BUILD.bazel

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@rules_go//proto:def.bzl", "go_proto_library")
22
load("@rules_proto//proto:defs.bzl", "proto_library")
3+
load("@rules_python//python:proto.bzl", "py_proto_library")
34

45
package(default_visibility = ["//visibility:public"])
56

@@ -9,13 +10,10 @@ proto_library(
910
deps = ["@com_google_protobuf//:any_proto"],
1011
)
1112

12-
# Broken because rules_python's py_proto_library doesnt produce the same
13-
# PyInfo symbol that py_test expects.
14-
# load("@rules_python//python:proto.bzl", "py_proto_library")
15-
# py_proto_library(
16-
# name = "foo_py_proto",
17-
# deps = [":foo_proto"],
18-
# )
13+
py_proto_library(
14+
name = "foo_py_proto",
15+
deps = [":foo_proto"],
16+
)
1917

2018
# Broken by https://github.com/protocolbuffers/protobuf/pull/19679
2119
# which causes building C++ code from source.

examples/python/BUILD

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# See comment in examples/BUILD.bazel
2-
# py_test(
3-
# name = "message_test",
4-
# srcs = ["message_test.py"],
5-
# deps = ["//:foo_py_proto"],
6-
# )
1+
py_test(
2+
name = "message_test",
3+
srcs = ["message_test.py"],
4+
deps = ["//:foo_py_proto"],
5+
)

0 commit comments

Comments
 (0)