diff options
author | Alexander Polcyn <apolcyn@google.com> | 2018-03-06 10:28:35 -0800 |
---|---|---|
committer | Alexander Polcyn <apolcyn@google.com> | 2018-03-06 10:40:54 -0800 |
commit | 092f19947426d74a8b992072e3a9805c3885eada (patch) | |
tree | 3f1a2725ece844dbf600850f22a286194e1c395d | |
parent | 6eae794c9f8f305a51274a79400124093ddc9354 (diff) |
Clean up grpc_py_binary build rule
-rw-r--r-- | bazel/grpc_build_system.bzl | 10 | ||||
-rw-r--r-- | test/cpp/naming/BUILD | 3 |
2 files changed, 5 insertions, 8 deletions
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 3813f57c10..7bc186265d 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -170,17 +170,13 @@ def grpc_sh_binary(name, srcs, data = []): srcs = srcs, data = data) -def grpc_py_binary(name, srcs, data = [], deps = []): - if name == "test_dns_server": - deps = _get_external_deps([ - "twisted", - "yaml", - ]) +def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonly = False): native.py_binary( name = name, srcs = srcs, data = data, - deps = deps) + deps = deps + _get_external_deps(external_deps) + ) def grpc_package(name, visibility = "private", features = []): if visibility == "tests": diff --git a/test/cpp/naming/BUILD b/test/cpp/naming/BUILD index 24c3d1a443..a8fa0a078a 100644 --- a/test/cpp/naming/BUILD +++ b/test/cpp/naming/BUILD @@ -37,10 +37,11 @@ grpc_sh_binary( grpc_py_binary( name = "test_dns_server", srcs = ["test_dns_server.py"], + testonly = True, data = [ "resolver_test_record_groups.yaml", ], - deps = [ + external_deps = [ "twisted", "yaml", ] |