fix(pypi): fix the whl selection algorithm after #2069#2078
Merged
aignas merged 10 commits intobazel-contrib:mainfrom Jul 20, 2024
Merged
fix(pypi): fix the whl selection algorithm after #2069#2078aignas merged 10 commits intobazel-contrib:mainfrom
aignas merged 10 commits intobazel-contrib:mainfrom
Conversation
Collaborator
Would this show up as the "Fetching repo bla bla ..." step taking a long time? When I was working on the docs yesterday, there were a couple pypi deps (markup safe sounds familiar) that seemed to be taking a long time to become available. I chalked it up slow downloads or because I was modifying the pypi blz code, but maybe it was building it from source in the repo phase. |
rickeylev
requested changes
Jul 19, 2024
Collaborator
Author
|
Correct, it was building |
rickeylev
approved these changes
Jul 20, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It seems that a few things broke in recent commits:
MODULE.bazel.lockfile and it seems that it is easy tomiss when the components in the PyPI extension stop integrating well
together. This happened during the switch to
{abi}_{os}_{plat}targetplatform passing within the code.
to add the
rule_name.repo_utils.getenvwas always gettingPATHenv var on bazel6.x.This PR fixes both cases and updates docs to serve as a better reminder. By
fixing the
select_whlscode and we can just rely on target platform triples(ABI, OS, CPU). This gets one step closer to maybe supporting optional
python_versionwhich would address #1708. Whilst at it we are also addingdifferent status messages for building the wheel from
sdistvs justextracting or downloading the wheel.
Tests:
MODULE.bazel.lockfiles in ourrules_pythonextension before refactor(pypi): split out more utils and start passing 'abi_os_arch' around #2069 and after this PR and there are nodifferences except in the
experimental_target_platformsattribute inwhl_library. Before this PR you would see that we do not select any wheelsfor e.g.
MarkupSafeand we are always building fromsdist.Work towards #260.