Skip to content

refactor(pypi): make whl_library a macro and split impl into whl_archive and pip_archive#3948

Open
aignas wants to merge 12 commits into
bazel-contrib:mainfrom
aignas:aignas.refactor.macro_whl_library
Open

refactor(pypi): make whl_library a macro and split impl into whl_archive and pip_archive#3948
aignas wants to merge 12 commits into
bazel-contrib:mainfrom
aignas:aignas.refactor.macro_whl_library

Conversation

@aignas

@aignas aignas commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Before this PR the whl_library would be a do-all repository rule. Whilst it
is convenient to reuse the code, it is actually really difficult to maintain
and make it more performant. Side effect here is that the python dependencies
(like setuptools, etc) will no longer be downloaded for whl-only extracts,
it makes it a tiny bit faster.

With this split we can drop certain dependencies from the whl extraction and
optimize the common path - whl extraction where the URL for downloading the
wheel is known. This also allows us to start handling the sdists in an entirely
different way.

In a followup PR I plan to split the part which just extracts the wheel to
lay a more surgical foundation to #3856.

Foundation work for #2410.
Split out of #3856.
Work towards #2948.

@aignas
aignas requested a review from rickeylev as a code owner July 24, 2026 09:19
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@aignas

aignas commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@rickeylev
rickeylev requested a review from dougthor42 as a code owner July 24, 2026 16:12
@rickeylev
rickeylev removed the request for review from dougthor42 July 24, 2026 16:13
@rickeylev

Copy link
Copy Markdown
Collaborator

argh, what the heck, it went totally awol and borked this. I'll reset and fix it.

@rickeylev
rickeylev force-pushed the aignas.refactor.macro_whl_library branch from ecff978 to db4f499 Compare July 24, 2026 16:17
Rename internal repository implementation function _whl_library_impl to _pip_archive_impl to match the pip_archive repository rule name.
@rickeylev
rickeylev enabled auto-merge July 24, 2026 16:22
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.

2 participants