Skip to content

Fix _has_valid_outer_pip when pip is missing#1003

Merged
henryiii merged 1 commit intopypa:mainfrom
notatallshaw:fix-missing-pip-detection
Mar 25, 2026
Merged

Fix _has_valid_outer_pip when pip is missing#1003
henryiii merged 1 commit intopypa:mainfrom
notatallshaw:fix-missing-pip-detection

Conversation

@notatallshaw
Copy link
Member

#980 inverted the control flow of _has_valid_outer_pip to use a walrus operator, but the final return True was not updated. When pip is missing, _has_dependency returns None, the if dist := block is skipped, and the method returns True instead of None.

This causes build to try using a non-existent pip via --python instead of falling back to virtualenv.

@notatallshaw notatallshaw force-pushed the fix-missing-pip-detection branch from bb3b933 to d7b4dec Compare March 25, 2026 00:59
@henryiii henryiii mentioned this pull request Mar 25, 2026
@henryiii henryiii merged commit b945752 into pypa:main Mar 25, 2026
65 checks passed
adamtheturtle added a commit to adamtheturtle/literalizer that referenced this pull request Mar 25, 2026
build 1.4.1 has a regression where `_has_valid_outer_pip` returns
`True` when pip is not installed, causing isolated build environments
to fail with "No module named pip". A fix exists upstream
(pypa/build#1003) but has not been released.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pfebrer added a commit to metatensor/metatrain that referenced this pull request Mar 25, 2026
Our CI is failing because of pypa/build#1003 , so we restrict `build` until this is fixed in a release.
Krishnachaitanyakc added a commit to Krishnachaitanyakc/Pillow that referenced this pull request Mar 25, 2026
@gaborbernat
Copy link
Collaborator

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.

3 participants