Debian Codegraph @

src/python/grpcio_tests/tests/interop/BUILD.bazel

raw
1 # Copyright 2021 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 load("@grpc_python_dependencies//:requirements.bzl", "requirement")
15
16 package(default_visibility = ["//visibility:public"])
17
18 py_library(
19 name = "_intraop_test_case",
20 srcs = ["_intraop_test_case.py"],
21 imports = ["../../"],
22 deps = [
23 ":methods",
24 ],
25 )
26
27 py_library(
28 name = "client_lib",
29 srcs = ["client.py"],
30 imports = ["../../"],
31 deps = [
32 ":methods",
33 ":resources",
34 "//src/proto/grpc/testing:py_test_proto",
35 "//src/python/grpcio/grpc:grpcio",
36 requirement("google-auth"),
37 ],
38 )
39
40 py_binary(
41 name = "client",
42 srcs = ["client.py"],
43 python_version = "PY3",
44 deps = [":client_lib"],
45 )
46
47 py_library(
48 name = "methods",
49 srcs = ["methods.py"],
50 imports = ["../../"],
51 deps = [
52 "//src/proto/grpc/testing:empty_py_pb2",
53 "//src/proto/grpc/testing:py_messages_proto",
54 "//src/proto/grpc/testing:py_test_proto",
55 "//src/proto/grpc/testing:test_py_pb2_grpc",
56 "//src/python/grpcio/grpc:grpcio",
57 "//src/python/grpcio_tests/tests:bazel_namespace_package_hack",
58 requirement("google-auth"),
59 requirement("requests"),
60 requirement("urllib3"),
61 requirement("chardet"),
62 requirement("certifi"),
63 requirement("idna"),
64 ],
65 )
66
67 py_library(
68 name = "resources",
69 srcs = ["resources.py"],
70 data = [
71 "//src/python/grpcio_tests/tests/interop/credentials",
72 ],
73 )
74
75 py_library(
76 name = "service",
77 srcs = ["service.py"],
78 imports = ["../../"],
79 deps = [
80 "//src/proto/grpc/testing:empty_py_pb2",
81 "//src/proto/grpc/testing:py_messages_proto",
82 "//src/proto/grpc/testing:py_test_proto",
83 "//src/python/grpcio/grpc:grpcio",
84 ],
85 )
86
87 py_library(
88 name = "server",
89 srcs = ["server.py"],
90 imports = ["../../"],
91 deps = [
92 ":resources",
93 ":service",
94 "//src/proto/grpc/testing:py_test_proto",
95 "//src/python/grpcio/grpc:grpcio",
96 "//src/python/grpcio_tests/tests/unit:test_common",
97 ],
98 )
99
100 py_binary(
101 name = "server_bin",
102 srcs = ["server.py"],
103 main = "server.py",
104 python_version = "PY3",
105 deps = [
106 ":server",
107 ":service",
108 "//src/proto/grpc/testing:test_py_pb2_grpc",
109 ],
110 )
111
112 py_test(
113 name = "_insecure_intraop_test",
114 size = "small",
115 srcs = ["_insecure_intraop_test.py"],
116 data = [
117 "//src/python/grpcio_tests/tests/unit/credentials",
118 ],
119 imports = ["../../"],
120 main = "_insecure_intraop_test.py",
121 python_version = "PY3",
122 deps = [
123 ":_intraop_test_case",
124 ":server",
125 ":service",
126 "//src/proto/grpc/testing:py_test_proto",
127 "//src/python/grpcio/grpc:grpcio",
128 "//src/python/grpcio_tests/tests/unit:test_common",
129 ],
130 )
131
132 py_test(
133 name = "_secure_intraop_test",
134 size = "small",
135 srcs = ["_secure_intraop_test.py"],
136 imports = ["../../"],
137 main = "_secure_intraop_test.py",
138 python_version = "PY3",
139 deps = [
140 ":_intraop_test_case",
141 ":server",
142 ":service",
143 "//src/proto/grpc/testing:py_test_proto",
144 "//src/python/grpcio/grpc:grpcio",
145 "//src/python/grpcio_tests/tests/unit:test_common",
146 ],
147 )