-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
GH-80789: Bundle ensurepip
wheels at build time
#109130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0d8c94f
Remove bundled pip wheel
webknjaz c2c9a55
Add bundle_ensurepip_wheels
AA-Turner 76de0b8
Remove verify_ensurepip_wheels
AA-Turner 252ee8e
Add Makefile target
AA-Turner 800c487
Merge branch 'main' into ensurepip/bundler-tools
AA-Turner 4f0b3a2
Attempt to fix Cirrus CI
AA-Turner 0aaf135
Integrate into build
AA-Turner a163396
Revert "Integrate into build"
AA-Turner ccaad2d
Changes from first review
AA-Turner db6f0db
Merge branch 'main' into ensurepip/bundler-tools
AA-Turner 8fae12a
Add an explanatory comment to Cirrus CI
AA-Turner 161f304
Merge branch 'main' into ensurepip/bundler-tools
AA-Turner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Merge branch 'main' into ensurepip/bundler-tools
# Conflicts: # .cirrus.yml
- Loading branch information
commit db6f0db0a8792cf1884d6b13b5ee507942ffdb1e
There are no files selected for viewing
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
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the reason for adding it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything using venv or ensurepip during testing needs this provisioning step. If there's no uses, it'd be unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual reason to include it is that Cirrus CI failed without this and passed with it. I don't know why Free BSD requires the venv step though, as all other tests pass normally -- only documentation and hypothesis (which use venvs) seem to have an explicit venv step.
A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AA-Turner It's not because of
venv
butensurepip
itself. The call chain looks as follows:test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script
calls a CPython build preparation helper @ https://github.com/python/cpython/blob/cbb3a6f/Lib/test/test_tools/test_freeze.py#L28make install
here https://github.com/python/cpython/blob/cbb3a6f/Tools/freeze/test/freeze.py#L184.make install
callsensurepip
at https://github.com/python/cpython/blob/cbb3a6f/Makefile.pre.in#L1932-L1933 to provision it into the new Python install directory.ensurepip
uses the bundled pip wheel to run bootstrapping so it attempts to unpack it and freaks out when there's no dist for it: https://github.com/python/cpython/blob/cbb3a6f/Lib/ensurepip/__init__.py#L176.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not that FreeBSD or Cirrus requires the test explicitly, it's rather that this test is skipped on most platforms via https://github.com/python/cpython/blob/cbb3a6f/Lib/test/test_tools/test_freeze.py#L11-L20.