Skip to content

Prefer python3 over python when no Python command is configured - #180

Merged
rvandermeulen merged 1 commit into
mozilla:masterfrom
rvandermeulen:python3-default
Nov 19, 2026
Merged

rvandermeulen merged 1 commit into
mozilla:masterfrom
rvandermeulen:python3-default

Conversation

@rvandermeulen

Copy link
Copy Markdown
Collaborator

macOS 12.3 and later, and Debian or Ubuntu without python-is-python3, have no python command, so the linker wrapper fails there unless pythonCommand is set. When none of cargo { pythonCommand }, rust.pythonCommand or RUST_ANDROID_GRADLE_PYTHON_COMMAND is set, the plugin now uses python3 if it's on the PATH and falls back to python otherwise. Windows keeps python, since the python3 on its PATH is often the Microsoft Store alias rather than an installed Python. An explicitly configured command still takes precedence.

Fixes #88. This takes over from #130, which switches the default to python3 unconditionally and would break Windows setups that only have python.

macOS 12.3 and later, and Debian or Ubuntu without python-is-python3, have no python command, so the linker
wrapper failed there unless pythonCommand was set. Windows keeps python, since its python3 on the PATH is
often the Microsoft Store alias rather than an installed Python. Fixes mozilla#88.

@segunfamisa segunfamisa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Change looks good to me.

Comment thread README.md Resolved
@rvandermeulen
rvandermeulen merged commit a69089f into mozilla:master Nov 19, 2026
13 checks passed
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.

linker-wrapper.sh fails on macOS 12.3 since bare python is not found

2 participants