Skip to content

python: guard _simulate bindings behind MUJOCO_BUILD_SIMULATE#3063

Open
arushsinghal wants to merge 1 commit intogoogle-deepmind:mainfrom
arushsinghal:fix/python-wheel-simulate-guard
Open

python: guard _simulate bindings behind MUJOCO_BUILD_SIMULATE#3063
arushsinghal wants to merge 1 commit intogoogle-deepmind:mainfrom
arushsinghal:fix/python-wheel-simulate-guard

Conversation

@arushsinghal
Copy link

What this PR does

Guards the Python _simulate extension behind MUJOCO_BUILD_SIMULATE
and the presence of mujoco::libmujoco_simulate.

This prevents Python wheel builds from failing when MuJoCo is built
without the simulate component (e.g. headless or minimal builds).

Why this is needed

The Python bindings currently attempt to unconditionally build
_simulate, which causes CMake configuration errors if
libmujoco_simulate is not available.

This change aligns the Python build behavior with core MuJoCo
build options.

Testing

  • Built MuJoCo without MUJOCO_BUILD_SIMULATE
  • Verified Python bindings no longer attempt to build _simulate
  • No behavior change when MUJOCO_BUILD_SIMULATE=ON

@google-cla
Copy link

google-cla bot commented Feb 2, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@arushsinghal
Copy link
Author

This change guards the Python _simulate extension behind
MUJOCO_BUILD_SIMULATE and avoids referencing libmujoco_simulate
when the target is not present.

Tested locally by toggling MUJOCO_BUILD_SIMULATE=ON/OFF and verifying
wheel build behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant