aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--WORKSPACE7
-rw-r--r--protobuf.bzl7
2 files changed, 10 insertions, 4 deletions
diff --git a/WORKSPACE b/WORKSPACE
index 58e7a832..f3020843 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -14,6 +14,13 @@ http_archive(
urls = ["https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55"],
)
+http_archive(
+ name = "bazel_skylib",
+ sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
+ strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
+ urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
+)
+
bind(
name = "python_headers",
actual = "//util/python:python_headers",
diff --git a/protobuf.bzl b/protobuf.bzl
index 4226a142..8bbd0564 100644
--- a/protobuf.bzl
+++ b/protobuf.bzl
@@ -1,3 +1,5 @@
+load("@bazel_skylib//:lib.bzl", "versions")
+
def _GetPath(ctx, path):
if ctx.label.workspace_root:
return ctx.label.workspace_root + '/' + path
@@ -411,7 +413,4 @@ def check_protobuf_required_bazel_version():
This ensures bazel supports our approach to proto_library() depending on a
copied filegroup. (Fixed in bazel 0.5.4)
"""
- expected = apple_common.dotted_version("0.5.4")
- current = apple_common.dotted_version(native.bazel_version)
- if current.compare_to(expected) < 0:
- fail("Bazel must be newer than 0.5.4")
+ versions.check(minimum_bazel_version = "0.5.4")