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("@grpc_python_dependencies//:requirements.bzl", "requirement") 16load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test") 17 18package(default_testonly = 1) 19 20py_library( 21 name = "methods", 22 srcs = ["methods.py"], 23 imports = ["../../"], 24 deps = [ 25 "//src/proto/grpc/testing:empty_py_pb2", 26 "//src/proto/grpc/testing:py_messages_proto", 27 "//src/proto/grpc/testing:py_test_proto", 28 "//src/proto/grpc/testing:test_py_pb2_grpc", 29 "//src/python/grpcio/grpc:grpcio", 30 requirement("google-auth"), 31 requirement("requests"), 32 requirement("urllib3"), 33 requirement("chardet"), 34 requirement("certifi"), 35 requirement("idna"), 36 ], 37) 38 39py_test( 40 name = "local_interop_test", 41 size = "small", 42 srcs = ["local_interop_test.py"], 43 imports = ["../../"], 44 python_version = "PY3", 45 deps = [ 46 ":methods", 47 "//src/python/grpcio_tests/tests/interop:resources", 48 "//src/python/grpcio_tests/tests_aio/unit:_test_base", 49 "//src/python/grpcio_tests/tests_aio/unit:_test_server", 50 ], 51) 52 53py_binary( 54 name = "server", 55 srcs = ["server.py"], 56 imports = ["../../"], 57 python_version = "PY3", 58 deps = [ 59 "//src/python/grpcio/grpc:grpcio", 60 "//src/python/grpcio_tests/tests/interop:resources", 61 "//src/python/grpcio_tests/tests/interop:server", 62 "//src/python/grpcio_tests/tests_aio/unit:_test_server", 63 ], 64) 65 66py_binary( 67 name = "client", 68 srcs = ["client.py"], 69 imports = ["../../"], 70 python_version = "PY3", 71 deps = [ 72 ":methods", 73 "//src/python/grpcio/grpc:grpcio", 74 "//src/python/grpcio_tests/tests/interop:client_lib", 75 "//src/python/grpcio_tests/tests/interop:resources", 76 ], 77) 78