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 17py_binary( 18 name = "server", 19 srcs = ["server.py"], 20 python_version = "PY3", 21 srcs_version = "PY2AND3", 22 deps = [ 23 "//examples/protos:helloworld_py_pb2", 24 "//examples/protos:helloworld_py_pb2_grpc", 25 "//src/python/grpcio/grpc:grpcio", 26 ], 27) 28 29py_binary( 30 name = "client", 31 srcs = ["client.py"], 32 python_version = "PY3", 33 srcs_version = "PY2AND3", 34 deps = [ 35 "//examples/protos:helloworld_py_pb2", 36 "//examples/protos:helloworld_py_pb2_grpc", 37 "//src/python/grpcio/grpc:grpcio", 38 ], 39) 40 41py_test( 42 name = "test/compression_example_test", 43 size = "small", 44 srcs = ["test/compression_example_test.py"], 45 data = [ 46 ":client", 47 ":server", 48 ], 49 python_version = "PY3", 50 srcs_version = "PY2AND3", 51) 52