Przeglądaj źródła

Explicitly add python versions to examples.

Richard Belleville 6 lat temu
rodzic
commit
27990a5541

+ 3 - 0
examples/python/auth/BUILD.bazel

@@ -39,6 +39,7 @@ py_binary(
         "//examples:helloworld_py_pb2",
         "//examples:helloworld_py_pb2",
         "//examples:helloworld_py_pb2_grpc",
         "//examples:helloworld_py_pb2_grpc",
     ],
     ],
+    python_version = "PY3",
 )
 )
 
 
 py_binary(
 py_binary(
@@ -51,6 +52,7 @@ py_binary(
         "//examples:helloworld_py_pb2",
         "//examples:helloworld_py_pb2",
         "//examples:helloworld_py_pb2_grpc",
         "//examples:helloworld_py_pb2_grpc",
     ],
     ],
+    python_version = "PY3",
 )
 )
 
 
 py_test(
 py_test(
@@ -63,4 +65,5 @@ py_test(
         ":customized_auth_server",
         ":customized_auth_server",
         ":_credentials",
         ":_credentials",
     ],
     ],
+    python_version = "PY3",
 )
 )

+ 3 - 0
examples/python/cancellation/BUILD.bazel

@@ -45,6 +45,7 @@ py_binary(
         "//external:six"
         "//external:six"
     ],
     ],
     srcs_version = "PY2AND3",
     srcs_version = "PY2AND3",
+    python_version = "PY3",
 )
 )
 
 
 py_library(
 py_library(
@@ -68,6 +69,7 @@ py_binary(
         "//:python3": [],
         "//:python3": [],
     }),
     }),
     srcs_version = "PY2AND3",
     srcs_version = "PY2AND3",
+    python_version = "PY3",
 )
 )
 
 
 py_test(
 py_test(
@@ -78,4 +80,5 @@ py_test(
         ":server"
         ":server"
     ],
     ],
     size = "small",
     size = "small",
+    python_version = "PY3",
 )
 )

+ 3 - 0
examples/python/compression/BUILD.bazel

@@ -21,6 +21,7 @@ py_binary(
         "//examples:helloworld_py_pb2_grpc",
         "//examples:helloworld_py_pb2_grpc",
     ],
     ],
     srcs_version = "PY2AND3",
     srcs_version = "PY2AND3",
+    python_version = "PY3",
 )
 )
 
 
 py_binary(
 py_binary(
@@ -32,6 +33,7 @@ py_binary(
         "//examples:helloworld_py_pb2_grpc",
         "//examples:helloworld_py_pb2_grpc",
     ],
     ],
     srcs_version = "PY2AND3",
     srcs_version = "PY2AND3",
+    python_version = "PY3",
 )
 )
 
 
 py_test(
 py_test(
@@ -43,4 +45,5 @@ py_test(
       ":server",
       ":server",
     ],
     ],
     size = "small",
     size = "small",
+    python_version = "PY3",
 )
 )

+ 3 - 0
examples/python/debug/BUILD.bazel

@@ -35,6 +35,7 @@ py_binary(
         "//examples:helloworld_py_pb2",
         "//examples:helloworld_py_pb2",
         "//examples:helloworld_py_pb2_grpc",
         "//examples:helloworld_py_pb2_grpc",
     ],
     ],
+    python_version = "PY3",
 )
 )
 
 
 py_binary(
 py_binary(
@@ -45,6 +46,7 @@ py_binary(
         "//src/python/grpcio/grpc:grpcio",
         "//src/python/grpcio/grpc:grpcio",
         "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
         "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz",
     ],
     ],
+    python_version = "PY3",
 )
 )
 
 
 py_test(
 py_test(
@@ -59,4 +61,5 @@ py_test(
         ":send_message",
         ":send_message",
         ":get_stats",
         ":get_stats",
     ],
     ],
+    python_version = "PY3",
 )
 )

+ 1 - 0
examples/python/errors/BUILD.bazel

@@ -55,4 +55,5 @@ py_test(
         "../../../src/python/grpcio_status",
         "../../../src/python/grpcio_status",
         "../../../src/python/grpcio_tests",
         "../../../src/python/grpcio_tests",
     ],
     ],
+    python_version = "PY3",
 )
 )

+ 3 - 0
examples/python/multiprocessing/BUILD

@@ -42,6 +42,7 @@ py_binary(
         ":prime_proto_pb2_grpc",
         ":prime_proto_pb2_grpc",
     ],
     ],
     srcs_version = "PY3",
     srcs_version = "PY3",
+    python_version = "PY3",
 )
 )
 
 
 py_binary(
 py_binary(
@@ -57,6 +58,7 @@ py_binary(
         "//:python3": [],
         "//:python3": [],
     }),
     }),
     srcs_version = "PY3",
     srcs_version = "PY3",
+    python_version = "PY3",
 )
 )
 
 
 py_test(
 py_test(
@@ -67,4 +69,5 @@ py_test(
         ":server"
         ":server"
     ],
     ],
     size = "small",
     size = "small",
+    python_version = "PY3",
 )
 )

+ 1 - 0
examples/python/wait_for_ready/BUILD.bazel

@@ -30,4 +30,5 @@ py_test(
     srcs = ["test/_wait_for_ready_example_test.py"],
     srcs = ["test/_wait_for_ready_example_test.py"],
     deps = [":wait_for_ready_example",],
     deps = [":wait_for_ready_example",],
     size = "small",
     size = "small",
+    python_version = "PY3",
 )
 )