Skip to content

Comments

Build backend: Include readme and license files#9149

Merged
konstin merged 11 commits intomainfrom
konsti/build-backend-files
Nov 15, 2024
Merged

Build backend: Include readme and license files#9149
konstin merged 11 commits intomainfrom
konsti/build-backend-files

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
@konstin konstin requested a review from BurntSushi November 15, 2024 13:35
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!

///
/// 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
32 tasks
@konstin konstin merged commit 21d570f into main Nov 15, 2024
@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