Skip to content

Commit

Permalink
bazel: Python support for validate.proto. (#8)
Browse files Browse the repository at this point in the history
Needed to suppor Python protodoc tool in data-plane-api.

Signed-off-by: Harvey Tuch <[email protected]>
  • Loading branch information
htuch authored Nov 7, 2017
1 parent 23d8d65 commit f3332cb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,15 @@ http_archive(

go_rules_dependencies()
go_register_toolchains()

bind(
name = "six",
actual = "@six_archive//:six",
)

new_http_archive(
name = "six_archive",
build_file = "@com_google_protobuf//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
url = "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55",
)
11 changes: 10 additions & 1 deletion validate/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# gazelle:exclude validate.pb.go

load("//bazel:go_proto_library.bzl", "go_proto_library")
load("//bazel:protobuf.bzl", "cc_proto_library")
load("//bazel:protobuf.bzl", "cc_proto_library", "py_proto_library")

proto_library(
name = "validate_proto",
Expand All @@ -23,6 +23,15 @@ cc_proto_library(
visibility = ["//visibility:public"],
)

py_proto_library(
name = "validate_py",
srcs = ["validate.proto"],
protoc = "@com_google_protobuf//:protoc",
default_runtime = "@com_google_protobuf//:protobuf_python",
deps = ["@com_google_protobuf//:protobuf_python"],
visibility = ["//visibility:public"],
)

go_proto_library(
name = "go_default_library",
srcs = ["validate.proto"],
Expand Down

0 comments on commit f3332cb

Please sign in to comment.