Skip to content

fix: do not use uv to setup python on windows when conditions are not met#2005

Merged
henryiii merged 2 commits intopypa:mainfrom
mayeut:no-uv-windows-36
Sep 16, 2024
Merged

fix: do not use uv to setup python on windows when conditions are not met#2005
henryiii merged 2 commits intopypa:mainfrom
mayeut:no-uv-windows-36

Conversation

@mayeut
Copy link
Member

@mayeut mayeut commented Sep 14, 2024

uv was still used in setup_python on Windows even when use_uv was False.
This PR fixes setup_python to fallback to build frontend name instead of build[uv] in that case.
Added can_use_uv function to make sure wether or not uv is usable in a single place rather than duplicate the checks (and potentially forgetting one out of two if the conditions were to change).

Copy link
Contributor

@Czaki Czaki left a comment

Choose a reason for hiding this comment

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

Does the Linux not need similar refactor?

@mayeut
Copy link
Member Author

mayeut commented Sep 14, 2024

Does the Linux not need similar refactor?

Linux could if we want to push consistency even further but given it's used in only one place on Linux, the risk of modifying one place and forgetting the other does not exist there.

@henryiii henryiii merged commit 33da1f7 into pypa:main Sep 16, 2024
@mayeut mayeut deleted the no-uv-windows-36 branch September 16, 2024 18:42
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.

4 participants