-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Migrate fully to pyproject.toml #1324
Open
neiljp
wants to merge
6
commits into
zulip:main
Choose a base branch
from
neiljp:2023-03-13-pyproject
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
Previously setup.py specifically excluded tests from being packaged, but recent testing demonstrated this now included other files, including development tools. Moving to use the `include` option for the source is simpler here, combined with the addition of a MANIFEST.in file. The MANIFEST.in file is used by various tools, and appears more reliable than other methods to achieve this, particularly as we move towards using pyproject.toml. For now, this aims to remove all but the absolute minimum files to run.
0a65df3
to
f423b8e
Compare
This transfers details from setup.py to equivalent ones in pyproject.toml, and similarly removes or substitutes references to these files. Note: This introduces two changes from the previous state: * Building packages no longer removes the top title line shown on GitHub * The `zip_safe` property is detected automatically by `setuptools` This also adds a note to the making-a-new-release doc, since while it was previously out of date, setup.py will now be absent completely.
8fe4ead
to
38c29bd
Compare
Heads up @neiljp, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: infrastructure
Project infrastructure
has conflicts
size: XL
[Automatic label added by zulipbot]
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.
What does this PR do?
This completes the migration to use
pyproject.toml
in place of a combination ofsetup.cfg
andsetup.py
.While the migration itself is fairly straightforward, this required various back and forth comparisons to determine which files were included, since this was unclear from the previous version.
For this reason, the first commit modifies the way that files to be included are specified, which then translates cleanly when migrating to pyproject.toml.
The choice of MANIFEST.in was also motivated by exploration of setuptools_scm as an alternative/extra backend, which would allow packaging with specific versions, but which uses that file to determine files to be excluded compared to those in git.
Tested?
This has been tested to produce good sets of files, and published to testpypi.