Skip to content

Add python_version attr to mojo_binary / mojo_test#21

Merged
keith merged 1 commit intomainfrom
ks/add-python_version-attr-to-mojo_binary-mojo_test
Jun 24, 2025
Merged

Add python_version attr to mojo_binary / mojo_test#21
keith merged 1 commit intomainfrom
ks/add-python_version-attr-to-mojo_binary-mojo_test

Conversation

@keith
Copy link
Contributor

@keith keith commented Jun 24, 2025

This allows forcing a target to transition to a different python version
for the current target and all its deps. This allows easily testing
different python versions. This revealed another issue about python
version discovery, before python 3.11 if the python3 being used isn't in
the PATH sys.executable would find /usr/bin/python3 even if the
libpython was the correct version. This would likely only matter if
something used sys.executable, but we now fix by putting python3 in the
PATH.

This allows forcing a target to transition to a different python version
for the current target and all its deps. This allows easily testing
different python versions. This revealed another issue about python
version discovery, before python 3.11 if the python3 being used isn't in
the PATH sys.executable would find /usr/bin/python3 even if the
libpython was the correct version. This would likely only matter if
something used sys.executable, but we now fix by putting python3 in the
PATH.
@keith keith merged commit a4e6c45 into main Jun 24, 2025
6 checks passed
@keith keith deleted the ks/add-python_version-attr-to-mojo_binary-mojo_test branch June 24, 2025 00:28
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