Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
106 lines (93 loc) · 3.91 KB
/
Copy pathMODULE.bazel
File metadata and controls
106 lines (93 loc) · 3.91 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
# Copyright 2026 DeepMind Technologies Limited
#
# 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 = "mujoco",
version = "4.0.2",
# REPO.bazel uses ignore_directories(), which was added in Bazel 8.0.
bazel_compatibility = [">=8.0.0"],
)
# abseil-cpp, eigen, pybind11_bazel and rules_python are only needed by the
# Python bindings (//python/mujoco), but must be regular deps so downstream
# modules can build them. C-only consumers never fetch them, though they still
# take part in version resolution.
bazel_dep(name = "abseil-cpp", version = "20260107.1")
bazel_dep(name = "apple_support", version = "2.5.2")
bazel_dep(name = "bazel_skylib", version = "1.9.2")
bazel_dep(name = "ccd", version = "2.1.0.bcr.2")
bazel_dep(name = "eigen", version = "5.0.1.bcr.2")
bazel_dep(name = "glfw", version = "3.4.0.bcr.3")
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)
bazel_dep(name = "lodepng", version = "0.0.0-20250506-17d08dd")
bazel_dep(name = "marchingcubecpp", version = "0.0.0-20230911-f03a1b3")
bazel_dep(name = "miniz", version = "3.1.1")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "pybind11_bazel", version = "3.0.3")
bazel_dep(name = "qhull", version = "8.0.2.bcr.1")
bazel_dep(name = "rules_cc", version = "0.2.22")
bazel_dep(name = "rules_python", version = "2.4.5")
bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True)
bazel_dep(name = "tinyobjloader", version = "2.0.0-rc1.bcr.2")
bazel_dep(name = "tinyxml2", version = "11.0.0")
# Python toolchain and PyPI dependencies for the Python bindings in
# //python/mujoco. Runtime and build-time PyPI packages are referenced through
# the aliases in //python/mujoco/pypi.
#
# The default Python version comes from the same file the GitHub Actions CMake
# jobs pass to actions/setup-python, so both builds test the same version.
# Choosing a default is up to the root module, so this only applies when
# building MuJoCo itself; downstream modules pick their own.
python = use_extension(
"@rules_python//python/extensions:python.bzl",
"python",
dev_dependency = True,
)
python.defaults(python_version_file = "//:.github/workflows/python-version")
rules_python_config = use_extension(
"@rules_python//python/extensions:config.bzl",
"config",
)
rules_python_config.explicit_init_py(default = True)
# The version file must name one of these. Changing it to another listed
# version needs no edit here; a version that isn't listed fails with "No default
# Python toolchain configured". This matches the versions the wheels support
# (pyproject.toml).
_PYTHON_VERSIONS = [
"3.11",
"3.12",
"3.13",
"3.14",
"3.15",
]
[
python.toolchain(
ignore_root_user_error = True,
python_version = version,
)
for version in _PYTHON_VERSIONS
]
# The pip hub is not dev-only, because //python/mujoco needs its runtime
# dependencies and absl-py to run the code generators. It is parsed once per
# supported Python version, so @mujoco_pip serves wheels for whichever
# interpreter is in use. The lock file is the one the CMake build installs.
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
[
pip.parse(
experimental_index_url = "https://pypi.org/simple",
hub_name = "mujoco_pip",
python_version = version,
requirements_lock = "//:python/build_requirements.txt",
)
for version in _PYTHON_VERSIONS
]
use_repo(pip, "mujoco_pip")