Skip to content
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

refactor(whl_library): split out a whl_archive library #2214

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Sep 11, 2024

Before this PR users would need to download unused dependencies to just extract
the wheels. The minimum list of deps are - packaging and installer for our
whl_installer tool to properly work. This also means that we could not
dogfood our whl_installer tool in the pip-tools implementation.

With this PR we start using whl_archive which just patches, extracts the
wheel and parses METADATA where possible and this is the first step towards
separating how sdists are treated.

Summary:

  • refactor: split out whl_archive_impl function for just whls
  • refactor: make the implementation of the 'whl_archive' more minimal
  • use whl_archive in internal deps
  • use a py_library in pip_compile rule.
  • remove unused attrs from 'whl_archive'

urls = [url],
sha256 = sha256,
requirement = name.split("_")[-1],
repo = "pypi_",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it would be nice to dogfood the library, but we need to have a reference to the default (or some other) python interpreter in order to do this.

In bzlmod it is possible to do this, but in WORKSPACE it is not, so we may need to leave the deps.bzl as is.

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.

1 participant