fix: explicitly set Python interpreter in maturin build to prevent using wrong version#2277
Merged
geruh merged 1 commit intoapache:mainfrom Mar 23, 2026
Conversation
3 tasks
geruh
approved these changes
Mar 23, 2026
geruh
reviewed
Mar 23, 2026
| working-directory: "bindings/python" | ||
| command: build | ||
| args: --release -o dist | ||
| args: --release -o dist -i python3.12 # Explicitly set interpreter; manylinux containers have multiple Pythons and maturin may pick an older one |
Member
There was a problem hiding this comment.
nit: non blocking we can factor out the 3.12 to a variable for future upgrades
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
Maturin auto-discovers Python interpreters inside manylinux Docker containers and may pick an older version (e.g., 3.8) instead of the intended 3.12. The
actions/setup-pythonstep only installs Python on the host runner, not inside the container. (This is called by in thematurin-actiondocumentation)Fix by passing
-i python3.12tomaturin buildin all workflows:bindings_python_ci.ymlrelease_python.ymlrelease_python_nightly.ymlsdistcommands are unchanged since source distributions don't target a specific interpreter.Are these changes tested?
Yes, tested by manually triggering nightly build https://github.com/apache/iceberg-rust/actions/runs/23450629743
Log for
wheels (ubuntu-latest, x86_64)shows: