forked from grpc/grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
209 lines (181 loc) · 7.81 KB
/
MODULE.bazel
File metadata and controls
209 lines (181 loc) · 7.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# Copyright 2025 the gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
module(
name = "grpc",
version = "1.79.0-dev",
compatibility_level = 1,
repo_name = "com_github_grpc_grpc",
)
# Regular dependencies
# ====================
# -- Abseil library.
# Pinning version to be consistent with third_party/abseil-cpp
bazel_dep(name = "abseil-cpp", version = "20250512.1", repo_name = "com_google_absl")
single_version_override(
module_name = "abseil-cpp",
version = "20250512.1",
)
bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "boringssl", version = "0.20241024.0") # mismatched 20241211
bazel_dep(name = "c-ares", version = "1.19.1", repo_name = "com_github_cares_cares")
bazel_dep(name = "envoy_api", version = "0.0.0-20251216-6ef568c")
bazel_dep(name = "googleapis-cc", version = "1.0.0")
bazel_dep(name = "googleapis-grpc-cc", version = "1.0.0")
bazel_dep(name = "googleapis-python", version = "1.0.0")
bazel_dep(name = "googletest", version = "1.17.0", repo_name = "com_google_googletest")
bazel_dep(name = "opencensus-cpp", version = "0.0.0-20230502-50eb5de.bcr.2", repo_name = "io_opencensus_cpp")
bazel_dep(name = "openssl", version = "3.3.1.bcr.1")
bazel_dep(name = "opentelemetry-cpp", version = "1.19.0", repo_name = "io_opentelemetry_cpp")
bazel_dep(name = "platforms", version = "0.0.11")
# --- Protobuf related packages.
# Pinning to 31.1 to avoid xDs breakage until we can upgrade to Protobuf >= 33.0
bazel_dep(name = "protobuf", version = "31.1", repo_name = "com_google_protobuf")
single_version_override(
module_name = "protobuf",
version = "31.1",
)
bazel_dep(name = "protoc-gen-validate", version = "1.2.1.bcr.1", repo_name = "com_envoyproxy_protoc_gen_validate") # Not needed directly
bazel_dep(name = "re2", version = "2024-07-02.bcr.1", repo_name = "com_googlesource_code_re2") # mismatched 2022-04-01
bazel_dep(name = "rules_apple", version = "3.16.0", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "rules_shell", version = "0.4.0")
bazel_dep(name = "xds", version = "0.0.0-20251210-ee656c7", repo_name = "com_github_cncf_xds")
# --- Zlib
# Patch is needed to for running Windows RBE tests.
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
single_version_override(
module_name = "zlib",
patch_strip = 1,
patches = [
"//bazel:zlib.patch",
],
version = "1.3.1.bcr.5",
)
# Development dependencies
# ========================
bazel_dep(name = "google_benchmark", version = "1.9.0", dev_dependency = True, repo_name = "com_github_google_benchmark")
# Python dependencies
# ===================
bazel_dep(name = "rules_python", version = "1.6.3")
PYTHON_VERSIONS = [
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
]
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
python.toolchain(
is_default = python_version == PYTHON_VERSIONS[-1],
python_version = python_version,
)
for python_version in PYTHON_VERSIONS
]
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
[
pip.parse(
hub_name = "grpc_python_dependencies",
python_version = python_version,
requirements_lock = "//:requirements.bazel.lock",
)
for python_version in PYTHON_VERSIONS
]
use_repo(pip, "grpc_python_dependencies")
bazel_dep(name = "cython", version = "3.0.11-1")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "typing_extensions",
build_file = "//third_party:typing_extensions.BUILD",
sha256 = "bf6f56b36d8bc9156e518eb1cc37a146284082fa53522033f772aefbecfd15fc",
strip_prefix = "typing_extensions-4.12.2",
url = "https://github.com/python/typing_extensions/archive/4.12.2.tar.gz",
)
# --- Provide repo @com_google_fuzztest.
bazel_dep(name = "fuzztest", version = "20250805.0", dev_dependency = True, repo_name = "com_google_fuzztest") # mismatched 2023-05-16
# This package is not directly used by grpc, but requested by fuzztest.
#
# The reason for version bump is because bazel resolve this package to riegeli@0.0.0-20240606-973b6f0,
# which is incompatible with the version of abseil-cpp we use.
#
# See also https://bazel.build/external/module#version-selection.
bazel_dep(name = "riegeli", version = "0.0.0-20250706-c4d1f27", dev_dependency = True)
# --- Provide repo @grpc_custom_exec_properties.
http_archive(
name = "bazel_toolchains",
integrity = "sha256-F57AL4Cehqv1Y1bYiYyL10Bp8b18VgRAUMLNPXnQ4CQ=",
strip_prefix = "bazel-toolchains-4.1.0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
],
)
exec_properties = use_extension("//bazel:extensions.bzl", "exec_properties")
exec_properties.custom_exec_properties(
name = "grpc_custom_exec_properties",
constant = "LARGE_MACHINE",
rbe_exec_properties_dict = {
"os": "ubuntu",
"machine_size": "large",
},
)
use_repo(exec_properties, "grpc_custom_exec_properties")
# -- google_cloud_cpp 2.35.0 related repos, which requires a modified version of googleapis, hence the version pinning.
bazel_dep(name = "googleapis", version = "0.0.0-20251003-2193a2bf", repo_name = "com_google_googleapis")
single_version_override(
module_name = "googleapis",
patch_strip = 1,
patches = [
"//bazel:googleapis/patches/fix_google_cloud_cpp.patch",
],
version = "0.0.0-20251003-2193a2bf",
)
bazel_dep(name = "google_cloud_cpp", version = "2.35.0", dev_dependency = True)
archive_override(
module_name = "google_cloud_cpp",
integrity = "sha256-geooz55bsDLTVrAYdAnzCxA1+OpbUwZ16iSMimwAcKo=",
strip_prefix = "google-cloud-cpp-2.35.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.35.0.tar.gz",
"https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.35.0.tar.gz",
],
)
# --- libpfm 4.11.0
#
# Not directly used, depended on by google_benchmark.
# Override URL with our mirror site because the original link is broken.
#
# See also https://github.com/bazelbuild/bazel-central-registry/blob/c83ac4d4bac24aeebf1b99f8b8d21166e0886397/modules/libpfm/4.11.0.bcr.1/source.json
bazel_dep(name = "libpfm", version = "4.11.0.bcr.1", dev_dependency = True)
archive_override(
module_name = "libpfm",
integrity = "sha256-XaX4hyveFLNjTJaI2YD2i9ootRAmhyPMEpc+7bq5/sw=",
patch_strip = 1,
patches = [
"//bazel:libpfm.patch",
],
strip_prefix = "libpfm-4.11.0",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.11.0.tar.gz",
"https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.11.0.tar.gz/download",
],
)
# --- Python headers
# TODO(weizheyuan): Maybe replace this with python header exposed by rules_python.
# See also https://github.com/grpc/grpc/issues/24665
python_configure = use_repo_rule("//third_party/py:python_configure.bzl", "python_configure")
python_configure(name = "local_config_python")