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

Build backend: Include readme and license files #9149

Merged
merged 11 commits into from
Nov 15, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Nov 15, 2024

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

@konstin konstin added the preview Experimental behavior label Nov 15, 2024
Copy link
Member

@BurntSushi BurntSushi left a 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>>,
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

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

@konstin konstin enabled auto-merge (squash) November 15, 2024 14:30
@konstin konstin mentioned this pull request Nov 15, 2024
26 tasks
@konstin konstin merged commit 21d570f into main Nov 15, 2024
64 checks passed
@konstin konstin deleted the konsti/build-backend-files branch November 15, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants