Skip to content

Conversation

@nolar
Copy link
Owner

@nolar nolar commented Nov 5, 2025

The approach with executable setup.py is 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-scm and 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.

@nolar nolar added automation CI/CD: testing, linting, releasing automatically refactoring Code cleanup without new features added labels Nov 5, 2025
@nolar nolar force-pushed the pyproject-toml branch 4 times, most recently from c01a27a to d4a7f33 Compare November 5, 2025 21:05
@nolar nolar force-pushed the pyproject-toml branch 2 times, most recently from 6c786a7 to fbb207e Compare December 8, 2025 20:18
nolar added 2 commits December 8, 2025 21:27
The approach with executable `setup.py` is 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-scm` and 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.

Signed-off-by: Sergey Vasilyev <[email protected]>
@nolar nolar merged commit 3f7087f into main Dec 8, 2025
23 checks passed
@nolar nolar deleted the pyproject-toml branch December 8, 2025 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation CI/CD: testing, linting, releasing automatically refactoring Code cleanup without new features added

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants