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