forked from claws/cookiecutter-python-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Replace setuptools with Hatch #1
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
Merged
Merged
Conversation
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
eg. GPL-3.0-only and GPL-3.0-or-later should be able to point to the same license file.
If we select GPL-3.0-or-later (for example), GPL-3.0-only would be processed first, and the license/GPL3 file would be added to the sources set for removal, because it was not excluded. Next, GPL-3.0-or-later would be processed and would avoid adding the license to sources going forward, but it would already be too late at that point. Here, we remove (or "discard") any existing matches in the sources set if present, when we find the license that matches what was requested.
Package requirements are now configured in pyproject.toml.
From the Python Packaging User Guide of the `license` field documentation: > If you are using a standard, well-known license, it is not necessary > to use this field. Instead, you should use one of the classifiers > starting with License ::.
This is used by the Makefile `dist` target.
ginopacho
approved these changes
Dec 2, 2024
Owner
Author
|
Thanks Gino. |
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.
Card
None (but serves to facilitate other projects)
Description
The primary purpose of these changes are to switch away from setuptools to a Hatch, a modern alternative. It allows for the removal of the Python-based setup.py, and replaces it with a declarative TOML file that is easier to review and maintain.
This also cleans up the licensing options available through the wizard and improves license file deployment. The default is now "no license" which is arguably the safest possible default.
Lastly, there was some error handling around commands in Makefile that invoke git, the consolidation of mypi.ini options into pyproject.toml, updates to the default versions of Python that are supported, and the removal of requirements.txt and requirements.dev.txt (where such dependencies are also now defined in pyproject.toml).