Build backend: Include readme and license files#9149
Merged
Conversation
We need to access the fields to get the include globs.
BurntSushi
approved these changes
Nov 15, 2024
| /// | ||
| /// Not supported, an error if anything but the default empty list. | ||
| dynamic: Option<Vec<String>>, | ||
| pub(crate) dynamic: Option<Vec<String>>, |
Member
There was a problem hiding this comment.
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. |
Member
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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