Migrate from setup.py to pyproject.toml, but keep setuptools #1192
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.
The approach with executable
setup.pyis considered a legacy and insecure — it allows arbitrary code execution on the developers & building machines if a package repo is mistyped or only tried out. Developers might enable the safe mode where only the non-executable dependencies are installed, i.e. those based on PEP-621 (pyproject.toml).Setuptools and pip are a very lightweight and pre-installed toolkit for packaging, which is more than sufficient for Kopf. As an extra, they allow using
setuptools-scmand continue using git tags for versioning, which in turn enabled the GitHub UI for Releases.An alternative: Poetry — but it is heavy-weight and brings a lot of dependencies, which might conflict with the project itself, but it does not bring any benefits compared to setuptools. It might be good for big projects & apps, but seems like an overkill for a tiny library. Especially since some dependencies are optimised for the disk size and extracted into extras for this reason.