-
Notifications
You must be signed in to change notification settings - Fork 543
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
Add support for python-wheel data directory #1777
Comments
Thanks for the ticket. I think the need for adding data files is real and I am wondering if there is a way to make this work in a different way, for example using rules_pkg to somehow create a file mapping (I think it provides the renaming feature you mentioned about) and then consume that from rules python without adding an extra dependency on rules_pkg within the rules_python itself. I haven't looked at the code yet, so I don't know if it is possible and how difficult it would be, but the fact that we need to do changes all the way through to the wheelmaker and introduce a code similar to the extra dist info file handling makes me suspect that we may have some legacy baggage here. |
Thank you for the reply and support for this feature. I agree, this is a fairly invasive change (though I believe backwards compatible). Good thought on
I believe we need to put the usual files in that path, but data files in |
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
This feature addes attribute to the py_wheel rule and makes a related change to the wheelmaker tool. Fixes bazelbuild#1777
Fixes #1777 * Adds `data_files` attribute to `py_wheel` rule. * Minimal validation of the data-files target directories per [specification](https://packaging.python.org/en/latest/specifications/binary-distribution-format/#installing-a-wheel-distribution-1-0-py32-none-any-whl) * Added two tests. * Added example
🚀 feature request
Relevant Rules
//python:packaging.bzl - py_wheel
Description
The
py_wheel
rule should support the.data
directory as specified in PEP 427, The .data directory. This is different than including data files in the source tree.Describe the solution you'd like
It seems to me that changes are needed all the way down in
wheelmaker
, with arguments and logic that mirrors the support of the current flag 'extra_distinfo_file'. This would be exposed inpy_wheel
as perhapsdata_files
, and a similar ability to rename the files.Describe alternatives you've considered
I haven't been able to think of any alternatives, but would be open to hear about them from others.
Finally, let me take a moment to say thank you for a wonderful project. It is really easy to use and adopt, especially with bazelmod.
If the solution I've described is on the right track, I can take the first pass at implementing and testing it.
The text was updated successfully, but these errors were encountered: