-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Move package data rules to pyproject.toml and clean up MANIFEST.in #9825
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
base: main
Are you sure you want to change the base?
Conversation
e669da1 to
a7c8f57
Compare
a7c8f57 to
024448d
Compare
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.
Pull Request Overview
This PR modernizes the package configuration by consolidating package data rules into pyproject.toml, eliminating duplication between MANIFEST.in and pyproject.toml.
- Moved static, template, and locale file inclusion rules from MANIFEST.in to pyproject.toml
- Added license-files configuration for LICENSE.md
- Retained only test-related rules in MANIFEST.in
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Added package-data rules for templates, static files, and locale files; added license-files pattern |
| MANIFEST.in | Removed package data rules that were moved to pyproject.toml; kept test inclusion and exclusion rules |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description = "Web APIs for Django, made easy." | ||
| readme = "README.md" | ||
| license = "BSD-3-Clause" | ||
| license-files = [ "LICEN[CS]E*" ] |
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.
Why this regex instead of the following?
license-files = [ "LICENSE.md" ]
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.
yes I could have write license-files = [ "LICENSE.md" ]
The reason I used the regular expression LICEN[CS]E* or LICENSE instead of explicitly listing LICENSE.md is for flexibility and future-proofing.
i took inspiration from here, i know for our case it might be over engineered. but if we want more explicit (straightforward) i will update.
Since
pyproject.tomlis already used for packaging, I moved the static, template, and locale file rules fromMANIFEST.into pyproject.toml to avoid duplication.Changes:
pyproject.tomlLICENSE.mdMANIFEST.inreferences:
license
packaging-data
Build tested: source tarball and wheel include the expected files.