Skip to content

Added targets for data and dist-info to pip generated targets #519

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

Merged
merged 1 commit into from
Aug 31, 2021
Merged

Added targets for data and dist-info to pip generated targets #519

merged 1 commit into from
Aug 31, 2021

Conversation

UebelAndre
Copy link
Contributor

@UebelAndre UebelAndre commented Aug 30, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • Does not include precompiled binaries, eg. .par files. See CONTRIBUTING.md for info
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

A wheel is documented to contain both .dist-info and .data directories which contain additional metadata for a particular package. However, even though the pip repository rules extract wheel contents into the repository directory, data in these directories are not exposed. In order to access this, the :whl target must be consumed and unzipped again, even though this information already lives in the pip repository generated by Bazel. Something should be done to expose this data so users don't have to write additional parsers.

Issue Number: N/A

What is the new behavior?

This pull request exposes files in .data and .dist-info in individual filegroups, allowing users to consume them without having to re-extract this data from the wheel.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Aug 30, 2021
@UebelAndre UebelAndre marked this pull request as ready for review August 30, 2021 13:46
Copy link

@caseyduquettesc caseyduquettesc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

Thanks!

I wish there was a test for this, if you have some time could you add one in a followup? I'm not sure where to look for one (maybe the examples/pip_install could do something with the dist_info or data from boto3?)

@alexeagle alexeagle merged commit dfbf9bf into bazel-contrib:main Aug 31, 2021
@UebelAndre
Copy link
Contributor Author

Thanks!

I wish there was a test for this, if you have some time could you add one in a followup? I'm not sure where to look for one (maybe the examples/pip_install could do something with the dist_info or data from boto3?)

Yeah, I can put together a test when I have a block of free time

@UebelAndre
Copy link
Contributor Author

I've opened #524 to add tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants