Debian Codegraph @

examples/python/auth/BUILD.bazel

raw
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
15 filegroup(
16 name = "_credentials_files",
17 testonly = 1,
18 srcs = [
19 "credentials/localhost.crt",
20 "credentials/localhost.key",
21 "credentials/root.crt",
22 ],
23 )
24
25 py_library(
26 name = "_credentials",
27 testonly = 1,
28 srcs = ["_credentials.py"],
29 data = [":_credentials_files"],
30 )
31
32 py_binary(
33 name = "customized_auth_client",
34 testonly = 1,
35 srcs = ["customized_auth_client.py"],
36 data = ["helloworld.proto"],
37 python_version = "PY3",
38 deps = [
39 ":_credentials",
40 "//src/python/grpcio/grpc:grpcio",
41 "//tools/distrib/python/grpcio_tools:grpc_tools",
42 ],
43 )
44
45 py_binary(
46 name = "customized_auth_server",
47 testonly = 1,
48 srcs = ["customized_auth_server.py"],
49 data = ["helloworld.proto"],
50 python_version = "PY3",
51 deps = [
52 ":_credentials",
53 "//src/python/grpcio/grpc:grpcio",
54 "//tools/distrib/python/grpcio_tools:grpc_tools",
55 ],
56 )
57
58 py_binary(
59 name = "async_customized_auth_client",
60 testonly = 1,
61 srcs = ["async_customized_auth_client.py"],
62 data = ["helloworld.proto"],
63 imports = ["."],
64 python_version = "PY3",
65 deps = [
66 ":_credentials",
67 "//src/python/grpcio/grpc:grpcio",
68 "//tools/distrib/python/grpcio_tools:grpc_tools",
69 ],
70 )
71
72 py_binary(
73 name = "async_customized_auth_server",
74 testonly = 1,
75 srcs = ["async_customized_auth_server.py"],
76 data = ["helloworld.proto"],
77 imports = ["."],
78 python_version = "PY3",
79 deps = [
80 ":_credentials",
81 "//src/python/grpcio/grpc:grpcio",
82 "//tools/distrib/python/grpcio_tools:grpc_tools",
83 ],
84 )
85
86 py_test(
87 name = "_auth_example_test",
88 srcs = ["test/_auth_example_test.py"],
89 python_version = "PY3",
90 deps = [
91 ":_credentials",
92 ":async_customized_auth_client",
93 ":async_customized_auth_server",
94 ":customized_auth_client",
95 ":customized_auth_server",
96 "//src/python/grpcio/grpc:grpcio",
97 "//tools/distrib/python/grpcio_tools:grpc_tools",
98 ],
99 )