BUILD.bazel 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 2019 The gRPC Authors
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. package(default_testonly = 1)
  15. py_binary(
  16. name = "wait_for_ready_example",
  17. srcs = ["wait_for_ready_example.py"],
  18. data = ["helloworld.proto"],
  19. imports = ["."],
  20. python_version = "PY3",
  21. deps = [
  22. "//src/python/grpcio/grpc:grpcio",
  23. "//tools/distrib/python/grpcio_tools:grpc_tools",
  24. ],
  25. )
  26. py_binary(
  27. name = "asyncio_wait_for_ready_example",
  28. srcs = ["asyncio_wait_for_ready_example.py"],
  29. data = ["helloworld.proto"],
  30. imports = ["."],
  31. python_version = "PY3",
  32. deps = [
  33. "//src/python/grpcio/grpc:grpcio",
  34. "//tools/distrib/python/grpcio_tools:grpc_tools",
  35. ],
  36. )
  37. py_test(
  38. name = "test/_wait_for_ready_example_test",
  39. size = "small",
  40. srcs = ["test/_wait_for_ready_example_test.py"],
  41. python_version = "PY3",
  42. deps = [
  43. ":asyncio_wait_for_ready_example",
  44. ":wait_for_ready_example",
  45. ],
  46. )