BUILD.bazel 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 = "debug_server",
  17. srcs = ["debug_server.py"],
  18. data = ["helloworld.proto"],
  19. imports = ["."],
  20. python_version = "PY3",
  21. deps = [
  22. "//src/python/grpcio/grpc:grpcio",
  23. "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
  24. "//tools/distrib/python/grpcio_tools:grpc_tools",
  25. ],
  26. )
  27. py_binary(
  28. name = "send_message",
  29. srcs = ["send_message.py"],
  30. data = ["helloworld.proto"],
  31. imports = ["."],
  32. python_version = "PY3",
  33. deps = [
  34. "//src/python/grpcio/grpc:grpcio",
  35. "//tools/distrib/python/grpcio_tools:grpc_tools",
  36. ],
  37. )
  38. py_binary(
  39. name = "get_stats",
  40. srcs = ["get_stats.py"],
  41. python_version = "PY3",
  42. deps = [
  43. "//src/python/grpcio/grpc:grpcio",
  44. "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
  45. ],
  46. )
  47. py_binary(
  48. name = "asyncio_debug_server",
  49. srcs = ["asyncio_debug_server.py"],
  50. data = ["helloworld.proto"],
  51. imports = ["."],
  52. python_version = "PY3",
  53. deps = [
  54. "//src/python/grpcio/grpc:grpcio",
  55. "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
  56. "//tools/distrib/python/grpcio_tools:grpc_tools",
  57. ],
  58. )
  59. py_binary(
  60. name = "asyncio_send_message",
  61. srcs = ["asyncio_send_message.py"],
  62. data = ["helloworld.proto"],
  63. imports = ["."],
  64. python_version = "PY3",
  65. deps = [
  66. "//src/python/grpcio/grpc:grpcio",
  67. "//tools/distrib/python/grpcio_tools:grpc_tools",
  68. ],
  69. )
  70. py_binary(
  71. name = "asyncio_get_stats",
  72. srcs = ["asyncio_get_stats.py"],
  73. python_version = "PY3",
  74. deps = [
  75. "//src/python/grpcio/grpc:grpcio",
  76. "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
  77. ],
  78. )
  79. py_test(
  80. name = "_debug_example_test",
  81. srcs = ["test/_debug_example_test.py"],
  82. imports = ["."],
  83. python_version = "PY3",
  84. deps = [
  85. ":asyncio_debug_server",
  86. ":asyncio_get_stats",
  87. ":asyncio_send_message",
  88. ":debug_server",
  89. ":get_stats",
  90. ":send_message",
  91. ],
  92. )