-
Notifications
You must be signed in to change notification settings - Fork 772
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
Build backend: Include readme and license files #9149
Conversation
We need to access the fields to get the include globs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me!
/// Specifies which fields listed by PEP 621 were intentionally unspecified so another tool | ||
/// can/will provide such metadata dynamically. | ||
/// | ||
/// Not supported, an error if anything but the default empty list. | ||
dynamic: Option<Vec<String>>, | ||
pub(crate) dynamic: Option<Vec<String>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need access to everything? Would it be reasonable to expose only what you need through methods?
(I suggest this for abstract "encapsulation is good" reasons, and nothing in particular that is concrete. And I do sympathize with just making internals crate-public as that can often be easier.)
This document is the property of the Python Steering Union (not to | ||
be confused with the Python Secret Underground, which emphatically | ||
does not exist). We suppose it's okay for you to read this, but don't | ||
even think about quoting, copying, modifying, or distributing it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When building source distributions, we need to include the readme, so it can become part the METADATA body when building the wheel. We also need to support the license files from PEP 639. When building the source distribution, we copy those file relative to their origin, when building the wheel, we copy them to
.dist-info/licenses
.The test for idempotence in wheel building is merged into the file listing test, which also covers that source tree -> source dist -> wheel is equivalent to source tree -> wheel, though we do need to check for file inclusion stronger here.
Best reviewed commit-by-commit