BUILD.bazel 1.4 KB

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