Skip to content

Commit

Permalink
Fix the proto rules conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lidizheng committed Mar 25, 2019
1 parent 7771290 commit d7429db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 28 deletions.
9 changes: 9 additions & 0 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ licenses(["notice"]) # 3-clause BSD

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

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")
load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library")

grpc_proto_library(
name = "auth_sample",
Expand All @@ -43,6 +45,13 @@ grpc_proto_library(
srcs = ["protos/keyvaluestore.proto"],
)

py_proto_library(
name = "py_helloworld",
protos = ["protos/helloworld.proto"],
with_grpc = True,
deps = [requirement('protobuf'),],
)

cc_binary(
name = "greeter_client",
srcs = ["cpp/helloworld/greeter_client.cc"],
Expand Down
25 changes: 0 additions & 25 deletions examples/protos/BUILD.bazel

This file was deleted.

5 changes: 2 additions & 3 deletions examples/python/errors/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library")

py_library(
name = "client",
Expand All @@ -22,7 +21,7 @@ py_library(
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status:grpc_status",
"//examples/protos:py_helloworld_proto",
"//examples:py_helloworld",
requirement('googleapis-common-protos'),
],
)
Expand All @@ -34,7 +33,7 @@ py_library(
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status:grpc_status",
"//examples/protos:py_helloworld_proto",
"//examples:py_helloworld",
] + select({
"//conditions:default": [requirement("futures")],
"//:python3": [],
Expand Down

0 comments on commit d7429db

Please sign in to comment.