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