| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -100,7 +100,7 @@ jobs: | |
| - name: 'Configure CPython' | ||
| run: ./configure --with-pydebug | ||
| - name: 'Build CPython' | ||
| run: make -j4 | ||
| run: make all-with-ensurepip-dists-bundled -j4 | ||
| - name: 'Install build dependencies' | ||
| run: make -C Doc/ PYTHON=../python venv | ||
|
Comment thread
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality@AA-Turner so I looked into whether bundling pip into ensurepip is needed in doctests and the answer is “yes”. This line calls ../python -m venv (so it uses the Python build under test and not some OS-provided copy). The venv module relies on ensurepip to provision its site-packages/. When there's no pip wheel, it crashes (as it should!).
Sorry, something went wrong.
All reactions
|
||
| # Use "xvfb-run" since some doctest tests open GUI windows | ||
| Expand Down | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| * | ||
| !.gitignore | ||
| !README.md |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Upstream packaging | ||
|
|
||
| To populate this directory, the initial build packagers are supposed | ||
| to invoke the following command: | ||
|
|
||
| ```console | ||
| $ python -m ensurepip.bundle | ||
| ``` | ||
|
|
||
| It will download a pre-defined version of the Pip wheel. Its SHA-256 | ||
| hash is guaranteed to match the one on PyPI. | ||
|
|
||
| # Downstream packaging | ||
|
|
||
| Packagers of the downstream distributions are welcome to put an | ||
| alternative wheel version in the directory defined by the | ||
| `WHEEL_PKG_DIR` configuration setting. If this is done, | ||
|
|
||
| ```console | ||
| $ python -m ensurepip | ||
| ``` | ||
|
|
||
| will prefer the replacement distribution package over the bundled one. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| """Build time dist downloading and bundling logic.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import sys | ||
| from contextlib import suppress | ||
| from importlib.resources import as_file as _traversable_to_pathlib_ctx | ||
|
|
||
| from ._structs import BUNDLED_WHEELS_PATH, REMOTE_DIST_PKGS | ||
|
|
||
|
|
||
| def ensure_wheels_are_downloaded(*, verbosity: bool = False) -> None: | ||
| """Download wheels into bundle if they are not there yet.""" | ||
| for pkg in REMOTE_DIST_PKGS: | ||
| existing_whl_file_path = BUNDLED_WHEELS_PATH / pkg.wheel_file_name | ||
| with suppress(FileNotFoundError): | ||
| if pkg.matches(existing_whl_file_path.read_bytes()): | ||
| if verbosity: | ||
| print( | ||
| f'A valid `{pkg.wheel_file_name}` is already ' | ||
| 'present in cache. Skipping download.', | ||
| file=sys.stderr, | ||
| ) | ||
| continue | ||
|
|
||
| if verbosity: | ||
| print( | ||
| f'Downloading `{pkg.wheel_file_name}`...', | ||
| file=sys.stderr, | ||
| ) | ||
| downloaded_whl_contents = pkg.download_verified_wheel_contents() | ||
|
|
||
| if verbosity: | ||
| print( | ||
| f'Saving `{pkg.wheel_file_name}` to disk...', | ||
| file=sys.stderr, | ||
| ) | ||
| with _traversable_to_pathlib_ctx(BUNDLED_WHEELS_PATH) as bundled_dir: | ||
| whl_file_path = bundled_dir / pkg.wheel_file_name | ||
| whl_file_path.write_bytes(downloaded_whl_contents) |
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityDo we need ensurepip for the doctests?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNot sure. I thought something was failing, but that was at the time when I was trying to figure out the Makefile integration, and it didn't work. So maybe not, this needs some experimentation.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.