-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathMODULE.bazel
263 lines (243 loc) · 7.73 KB
/
MODULE.bazel
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# This file marks a workspace root for the Bazel build system.
# See `https://bazel.build/`.
# This file lists Drake's external dependencies as known to bzlmod. It is used
# in concert with WORKSPACE.bzlmod (which has the workspace-style externals).
module(
name = "drake",
# This version number should match MINIMUM_BAZEL_VERSION in CMakeLists.txt.
bazel_compatibility = [">=7.4.1"],
)
# Add starlark rules.
bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support") # noqa
bazel_dep(name = "bazel_features", version = "1.22.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.1.0")
bazel_dep(name = "rules_java", version = "8.6.1")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_python", version = "0.40.0")
bazel_dep(name = "rules_rust", version = "0.56.0")
bazel_dep(name = "rules_shell", version = "0.3.0")
# Customize our toolchains.
cc_configure = use_extension(
"@rules_cc//cc:extensions.bzl",
"cc_configure_extension",
)
use_repo(cc_configure, "local_config_cc")
# Add C++ dependencies that are part of our public API.
#
# We declare these dependencies twice -- as modules (bazel_dep) and repository
# rules (pkgconfig). The choice of whether module vs pkgconfig will be used is
# governed by the flags declared at drake/tools/flags/BUILD.bazel.
#
# For our CMake builds from source, the "WITH_USER_..." CMake options to choose
# the flavor are translated into the matching Bazel flags.
#
# For wheel builds, the module flavor is always used.
#
# For Bazel builds using Drake as an external, the module flavor is used by
# default but can be changed using the Bazel flags.
#
# For first-party Bazel builds (by Drake Developers), the pkgconfig flavor is
# used by default but can be changed using the Bazel flags.
bazel_dep(name = "eigen", version = "3.4.0.bcr.2", repo_name = "module_eigen")
bazel_dep(name = "fmt", version = "11.0.2.bcr.1", repo_name = "module_fmt")
bazel_dep(name = "spdlog", version = "1.15.0.bcr.3", repo_name = "module_spdlog") # noqa
eigen_repository = use_repo_rule(
"@drake//tools/workspace/eigen:repository.bzl",
"eigen_repository",
)
eigen_repository(name = "pkgconfig_eigen")
fmt_repository = use_repo_rule(
"@drake//tools/workspace/fmt:repository.bzl",
"fmt_repository",
)
fmt_repository(name = "pkgconfig_fmt")
spdlog_repository = use_repo_rule(
"@drake//tools/workspace/spdlog:repository.bzl",
"spdlog_repository",
)
spdlog_repository(name = "pkgconfig_spdlog")
# Load dependencies which are "public", i.e., made available to downstream
# projects.
#
# Downstream projects may load the same `drake_dep_repositories` module
# extension shown below and call its `use_repo` with whatever list of
# repositories they desire to cite from their project. It's safe to call
# `use_repo` on a subset of this list, or not call it at all downstream.
# Its only effect on a downstream project is to make the repository name
# visible to BUILD rules; Drake's own use of the repository is unaffected.
drake_dep_repositories = use_extension(
"@drake//tools/workspace:default.bzl",
"drake_dep_repositories",
)
use_repo(
drake_dep_repositories,
"blas",
"buildifier",
"drake_models",
"eigen",
"fmt",
"gflags",
"glib",
"glx",
"gtest",
"gurobi",
"lapack",
"lcm",
"libblas",
"liblapack",
"meshcat",
"mosek",
"opencl",
"opengl",
"pybind11",
"pycodestyle",
"python",
"snopt",
"spdlog",
"styleguide",
"x11",
"zlib",
)
# Load dependencies which are "private", i.e., not available for use by
# downstream projects. These are all "internal use only".
#
# TODO(jwnimmer-tri) By historical accident, not all of the repository names
# here end with "internal". We should work on improving the consistency, either
# by switching them to use BCR modules instead (e.g., nasm) or renaming them
# with any necessary deprecations (e.g., statsjs).
internal_repositories = use_extension(
"@drake//tools/workspace:default.bzl",
"internal_repositories",
)
use_repo(
internal_repositories,
"abseil_cpp_internal",
"bazelisk",
"ccd_internal",
"clang_cindex_python3_internal",
"clarabel_cpp_internal",
"clp_internal",
"coinutils_internal",
"com_jidesoft_jide_oss",
"common_robotics_utilities_internal",
"commons_io",
"conex_internal",
"csdp_internal",
"curl_internal",
"dm_control_internal",
"doxygen",
"fcl_internal",
"gfortran",
"github3_py_internal",
"gklib_internal",
"googlebenchmark",
"gymnasium_py",
"gz_math_internal",
"gz_utils_internal",
"highway_internal",
"ipopt_internal",
"libjpeg_turbo_internal",
"libpng_internal",
"libtiff_internal",
"metis_internal",
"mpmath_py_internal",
"msgpack_internal",
"mujoco_menagerie_internal",
"mumps_internal",
"mypy_extensions_internal",
"mypy_internal",
"nanoflann_internal",
"nasm",
"net_sf_jchart2d",
"nlohmann_internal",
"nlopt_internal",
"onetbb_internal",
"openusd_internal",
"org_apache_xmlgraphics_commons",
"osqp_internal",
"picosha2_internal",
"poisson_disk_sampling_internal",
"qdldl_internal",
"qhull_internal",
"ros_xacro_internal",
"rules_python_drake_constants",
"scs_internal",
"sdformat_internal",
"spgrid_internal",
"spral_internal",
"stable_baselines3_internal",
"statsjs",
"stduuid_internal",
"suitesparse_internal",
"sympy_py_internal",
"tinygltf_internal",
"tinyobjloader_internal",
"tinyxml2_internal",
"tomli_internal",
"typing_extensions_internal",
"uritemplate_py_internal",
"usockets_internal",
"uwebsockets_internal",
"voxelized_geometry_tools_internal",
"vtk_internal",
"xmlrunner_py",
"yaml_cpp_internal",
)
internal_crate_universe_repositories = use_extension(
"//tools/workspace:default.bzl",
"internal_crate_universe_repositories",
)
use_repo(
internal_crate_universe_repositories,
"crate__amd-0.2.2",
"crate__autocfg-1.4.0",
"crate__blas-0.22.0",
"crate__blas-sys-0.7.1",
"crate__cfg-if-1.0.0",
"crate__clarabel-0.9.0",
"crate__darling-0.14.4",
"crate__darling_core-0.14.4",
"crate__darling_macro-0.14.4",
"crate__derive_builder-0.11.2",
"crate__derive_builder_core-0.11.2",
"crate__derive_builder_macro-0.11.2",
"crate__either-1.13.0",
"crate__enum_dispatch-0.3.13",
"crate__equivalent-1.0.1",
"crate__fnv-1.0.7",
"crate__hashbrown-0.15.2",
"crate__ident_case-1.0.1",
"crate__indexmap-2.7.0",
"crate__itertools-0.11.0",
"crate__itoa-1.0.14",
"crate__lapack-0.19.0",
"crate__lapack-sys-0.14.0",
"crate__lazy_static-1.5.0",
"crate__libc-0.2.169",
"crate__memchr-2.7.4",
"crate__num-complex-0.4.6",
"crate__num-traits-0.2.19",
"crate__once_cell-1.19.0",
"crate__paste-1.0.15",
"crate__proc-macro2-1.0.92",
"crate__quote-1.0.38",
"crate__ryu-1.0.18",
"crate__serde-1.0.217",
"crate__serde_derive-1.0.217",
"crate__serde_json-1.0.134",
"crate__strsim-0.10.0",
"crate__syn-1.0.109",
"crate__syn-2.0.94",
"crate__thiserror-1.0.69",
"crate__thiserror-impl-1.0.69",
"crate__unicode-ident-1.0.14",
)
# TODO(#20731) More improvements are still needed to our MODULE organization:
# - Provide better configuration options for choosing dependencies.
# - Adjust the wheel build to build more dependencies as Bazel modules.
# - Update the maintainer docs in tools/workspace/README.
# - Debug any new glitches with the new_release automation.
# - Investigate any impact on S3 mirroring.
# - Deprecate non-bzlmod use of Drake downstream.