Skip to content

Commit b0e9d08

Browse files
quaglacopybara-github
authored andcommitted
Move introspect to python/introspect
PiperOrigin-RevId: 728695024 Change-Id: I96433e1e9ee509704d66bd4c1be1906732e4cc55
1 parent 6a86247 commit b0e9d08

19 files changed

+22
-5
lines changed

doc/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ General
3535
attaching can be restored by setting the deep copy flag to 1.
3636
- Added :ref:`potential<sensor-e_potential>` and :ref:`kinetic<sensor-e_kinetic>` energy sensors.
3737
- Improved shadow rendering in the native renderer.
38+
- Moved ``introspect`` to ``python/introspect``.
3839

3940
.. admonition:: Breaking API changes
4041
:class: attention

python/make_sdist.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ cp -r "${package_dir}"/* .
3636
# Generate header files.
3737
old_pythonpath="${PYTHONPATH}"
3838
if [[ "$(uname)" == CYGWIN* || "$(uname)" == MINGW* ]]; then
39-
export PYTHONPATH="${old_pythonpath};${package_dir}/.."
39+
export PYTHONPATH="${old_pythonpath};${package_dir}/mujoco/python/.."
4040
else
41-
export PYTHONPATH="${old_pythonpath}:${package_dir}/.."
41+
export PYTHONPATH="${old_pythonpath}:${package_dir}/mujoco/python/.."
4242
fi
4343
python "${package_dir}"/mujoco/codegen/generate_enum_traits.py > \
4444
mujoco/enum_traits.h

python/make_sdist_requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ pyproject_hooks==1.2.0 \
1818
--hash=sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913
1919
tomli==2.1.0; python_version < '3.11' \
2020
--hash=sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391
21+
typing-extensions==4.12.2 \
22+
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d
2123
zipp==3.21.0 \
2224
--hash=sha256:ac1bbe05fd2991f160ebce24ffbac5f6d11d83dc90891255885223d42b3cd931

python/mujoco/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/enum_traits.h)
215215
else()
216216
add_custom_command(
217217
OUTPUT enum_traits.h
218-
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${mujoco_SOURCE_DIR}/mujoco ${Python3_EXECUTABLE}
218+
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${mujoco_SOURCE_DIR}/mujoco/python/mujoco ${Python3_EXECUTABLE}
219219
${CMAKE_CURRENT_SOURCE_DIR}/codegen/generate_enum_traits.py > enum_traits.h
220220
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/codegen/generate_enum_traits.py
221221
)
@@ -233,7 +233,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/function_traits.h)
233233
else()
234234
add_custom_command(
235235
OUTPUT function_traits.h
236-
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${mujoco_SOURCE_DIR}/mujoco ${Python3_EXECUTABLE}
236+
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${mujoco_SOURCE_DIR}/mujoco/python/mujoco ${Python3_EXECUTABLE}
237237
${CMAKE_CURRENT_SOURCE_DIR}/codegen/generate_function_traits.py > function_traits.h
238238
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/codegen/generate_function_traits.py
239239
)
@@ -408,7 +408,7 @@ target_link_libraries(
408408
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/specs.cc.inc)
409409
add_custom_command(
410410
OUTPUT specs.cc.inc
411-
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${mujoco_SOURCE_DIR}/mujoco ${Python3_EXECUTABLE}
411+
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${mujoco_SOURCE_DIR}/mujoco/python ${Python3_EXECUTABLE}
412412
${CMAKE_CURRENT_SOURCE_DIR}/codegen/generate_spec_bindings.py > specs.cc.inc
413413
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/codegen/generate_spec_bindings.py
414414
)

python/mujoco/introspect/__init__.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2025 DeepMind Technologies Limited
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+
# ==============================================================================
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)