Skip to content

fix maturin build --pgo -i <version> with uv install#3237

Open
davidhewitt wants to merge 2 commits into
PyO3:mainfrom
davidhewitt:uv-pgo
Open

fix maturin build --pgo -i <version> with uv install#3237
davidhewitt wants to merge 2 commits into
PyO3:mainfrom
davidhewitt:uv-pgo

Conversation

@davidhewitt

Copy link
Copy Markdown
Member

Somewhat related to #3236

When using the --pgo argument to maturin build, if the interpreter is passed as e.g. -i 3.14 and a python 3.14 interpreter is not found on the path by maturin, then uv was being invoked to create a virtual environment with argument --python '' (i.e. empty).

This PR corrects this to forward a compatible version string to uv.

I also added a general integration test for PGO (however it doesn't specifically exercise this path, as passing a version to uv might force a download and it seemed fiddly to handle that in CI), and unit tests for the version strings passed to uv.

@davidhewitt davidhewitt changed the title Uv pgo fix maturin build --pgo -i <version> with uv install Jun 19, 2026
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.

2 participants