Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 15 additions & 27 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
workspace(name = "tensorflow_metadata")
git_repository(
name = "protobuf_bzl",
# v3.4.0
commit = "80a37e0782d2d702d52234b62dd4b9ec74fd2c95",
remote = "https://github.com/google/protobuf.git",
)
bind(
name = "protobuf",
actual = "@protobuf_bzl//:protobuf",
)
bind(
name = "protobuf_python",
actual = "@protobuf_bzl//:protobuf_python",
)
bind(
name = "protobuf_python_genproto",
actual = "@protobuf_bzl//:protobuf_python_genproto",
)
bind(
name = "protoc",
actual = "@protobuf_bzl//:protoc",
)

# Using protobuf version 3.6.0
# We need to import the protobuf library under the name com_google_protobuf
# to enable proto_library support in bazel.
http_archive(
name = "protobuf_archive",
name = "com_google_protobuf",
strip_prefix = "protobuf-3.6.0",
urls = ["https://github.com/google/protobuf/archive/v3.6.0.zip"],
sha256 = "50a5753995b3142627ac55cfd496cebc418a2e575ca0236e29033c67bd5665f4",
urls = [
"https://mirror.bazel.build/github.com/google/protobuf/archive/v3.6.0.tar.gz",
"https://github.com/google/protobuf/archive/v3.6.0.tar.gz",
]
)

# required by protobuf_python
# required by @com_google_protobuf//:protobuf_python
new_http_archive(
name = "six_archive",
build_file = "@protobuf_bzl//:six.BUILD",
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",
urls = [
"https://mirror.bazel.build/pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
"https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz",
],
)
bind(
name = "six",
Expand Down
39 changes: 19 additions & 20 deletions tensorflow_metadata/proto/v0/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,36 @@
# limitations under the License.
# ==============================================================================


licenses(["notice"]) # Apache 2.0

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

load("@protobuf_archive//:protobuf.bzl", "cc_proto_library", "py_proto_library")
load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")

METADATA_PROTO_SRCS = [
"anomalies.proto",
"path.proto",
"schema.proto",
"statistics.proto",
]

proto_library(
name = "metadata_v0_proto",
srcs = METADATA_PROTO_SRCS,
)

cc_proto_library(
name = "metadata_v0_proto_cc_pb2",
srcs = [
"anomalies.proto",
"path.proto",
"schema.proto",
"statistics.proto",
],
cc_libs = ["@protobuf_archive//:protobuf"],
default_runtime = "@protobuf_archive//:protobuf",
protoc = "@protobuf_archive//:protoc",
deps = [":metadata_v0_proto"],
)

py_proto_library(
name = "metadata_v0_proto_py_pb2",
srcs = [
"anomalies.proto",
"path.proto",
"schema.proto",
"statistics.proto",
],
default_runtime = "@protobuf_archive//:protobuf_python",
protoc = "@protobuf_archive//:protoc",
srcs = METADATA_PROTO_SRCS,
srcs_version = "PY2AND3",
deps = ["@protobuf_archive//:protobuf_python"],
)

java_proto_library(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you modify this to just add the java library? A large refactoring of the library is coming soon (see proto libraries in tensorflow serving and tensorflow data validation).

-Marty

name = "metadata_v0_proto_java_pb2",
deps = [":metadata_v0_proto"],
)