Fix up examples.

pull/19822/head
Richard Belleville 6 years ago
parent 9ac75a6d16
commit 2b7ec3ad23
  1. 1
      examples/BUILD
  2. 9
      examples/python/auth/BUILD.bazel
  3. 6
      examples/python/compression/BUILD.bazel
  4. 11
      examples/python/debug/BUILD.bazel
  5. 9
      examples/python/debug/get_stats.py
  6. 6
      examples/python/errors/BUILD.bazel

@ -68,7 +68,6 @@ proto_library(
py_proto_library(
name = "helloworld_py_pb2",
srcs = [":protos/helloworld_proto"],
deps = [requirement('protobuf')],
)
py_grpc_library(

@ -36,7 +36,8 @@ py_binary(
deps = [
":_credentials",
"//src/python/grpcio/grpc:grpcio",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
)
@ -47,8 +48,8 @@ py_binary(
deps = [
":_credentials",
"//src/python/grpcio/grpc:grpcio",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
)
@ -57,7 +58,7 @@ py_test(
srcs = ["test/_auth_example_test.py"],
deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
":customized_auth_client",
":customized_auth_server",
":_credentials",

@ -17,7 +17,8 @@ py_binary(
srcs = ["server.py"],
deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
srcs_version = "PY2AND3",
)
@ -27,7 +28,8 @@ py_binary(
srcs = ["client.py"],
deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
srcs_version = "PY2AND3",
)

@ -21,7 +21,8 @@ py_binary(
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
)
@ -31,7 +32,8 @@ py_binary(
srcs = ["send_message.py"],
deps = [
"//src/python/grpcio/grpc:grpcio",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
],
)
@ -51,9 +53,10 @@ py_test(
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
":debug_server",
":send_message",
":get_stats",
],
)
)

@ -20,8 +20,13 @@ from __future__ import print_function
import logging
import argparse
import grpc
from grpc_channelz.v1 import channelz_pb2
from grpc_channelz.v1 import channelz_pb2_grpc
try:
from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2
from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2_grpc
except ImportError:
from grpc_channelz.v1 import channelz_pb2
from grpc_channelz.v1 import channelz_pb2_grpc
def run(addr):

@ -21,7 +21,8 @@ py_library(
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status:grpc_status",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
requirement('googleapis-common-protos'),
],
)
@ -33,7 +34,8 @@ py_library(
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status:grpc_status",
"//examples:py_helloworld",
"//examples:helloworld_py_pb2",
"//examples:helloworld_py_pb2_grpc",
] + select({
"//conditions:default": [requirement("futures")],
"//:python3": [],

Loading…
Cancel
Save