aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazel
diff options
context:
space:
mode:
Diffstat (limited to 'bazel')
-rw-r--r--bazel/grpc_build_system.bzl6
-rw-r--r--bazel/grpc_deps.bzl62
2 files changed, 62 insertions, 6 deletions
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index 5447f2726a..3813f57c10 100644
--- a/bazel/grpc_build_system.bzl
+++ b/bazel/grpc_build_system.bzl
@@ -172,8 +172,10 @@ def grpc_sh_binary(name, srcs, data = []):
def grpc_py_binary(name, srcs, data = [], deps = []):
if name == "test_dns_server":
- # TODO: allow running test_dns_server in oss bazel test suite
- deps = []
+ deps = _get_external_deps([
+ "twisted",
+ "yaml",
+ ])
native.py_binary(
name = name,
srcs = srcs,
diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl
index e465312a40..9053d9d109 100644
--- a/bazel/grpc_deps.bzl
+++ b/bazel/grpc_deps.bzl
@@ -120,10 +120,64 @@ def grpc_deps():
if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules():
native.http_archive(
name = "com_github_bazelbuild_bazeltoolchains",
- strip_prefix = "bazel-toolchains-af4681c3d19f063f090222ec3d04108c4e0ca255",
+ strip_prefix = "bazel-toolchains-f3b09700fae5d7b6e659d7cefe0dcc6e8498504c",
urls = [
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
- "https://github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/f3b09700fae5d7b6e659d7cefe0dcc6e8498504c.tar.gz",
+ "https://github.com/bazelbuild/bazel-toolchains/archive/f3b09700fae5d7b6e659d7cefe0dcc6e8498504c.tar.gz",
],
- sha256 = "d58bb2d6c8603f600d522b6104d6192a65339aa26cbba9f11ff5c4b36dedb928",
+ sha256 = "ed829b5eea8af1f405f4cc3d6ecfc3b1365bb7843171036030a31b5127002311",
+ )
+
+# TODO: move some dependencies from "grpc_deps" here?
+def grpc_test_only_deps():
+ """Internal, not intended for use by packages that are consuming grpc.
+ Loads dependencies that are only needed to run grpc library's tests."""
+ native.bind(
+ name = "twisted",
+ actual = "@com_github_twisted_twisted//:twisted",
+ )
+
+ native.bind(
+ name = "yaml",
+ actual = "@com_github_yaml_pyyaml//:yaml",
+ )
+
+ if "com_github_twisted_twisted" not in native.existing_rules():
+ native.new_http_archive(
+ name = "com_github_twisted_twisted",
+ strip_prefix = "twisted-twisted-17.5.0",
+ url = "https://github.com/twisted/twisted/archive/twisted-17.5.0.zip",
+ build_file = "@com_github_grpc_grpc//third_party:twisted.BUILD",
+ )
+
+ if "com_github_yaml_pyyaml" not in native.existing_rules():
+ native.new_http_archive(
+ name = "com_github_yaml_pyyaml",
+ strip_prefix = "pyyaml-3.12",
+ url = "https://github.com/yaml/pyyaml/archive/3.12.zip",
+ build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD",
+ )
+
+ if "com_github_twisted_incremental" not in native.existing_rules():
+ native.new_http_archive(
+ name = "com_github_twisted_incremental",
+ strip_prefix = "incremental-incremental-17.5.0",
+ url = "https://github.com/twisted/incremental/archive/incremental-17.5.0.zip",
+ build_file = "@com_github_grpc_grpc//third_party:incremental.BUILD",
+ )
+
+ if "com_github_zopefoundation_zope_interface" not in native.existing_rules():
+ native.new_http_archive(
+ name = "com_github_zopefoundation_zope_interface",
+ strip_prefix = "zope.interface-4.4.3",
+ url = "https://github.com/zopefoundation/zope.interface/archive/4.4.3.zip",
+ build_file = "@com_github_grpc_grpc//third_party:zope_interface.BUILD",
+ )
+
+ if "com_github_twisted_constantly" not in native.existing_rules():
+ native.new_http_archive(
+ name = "com_github_twisted_constantly",
+ strip_prefix = "constantly-15.1.0",
+ url = "https://github.com/twisted/constantly/archive/15.1.0.zip",
+ build_file = "@com_github_grpc_grpc//third_party:constantly.BUILD",
)