Repository navigation
Switch packaging from poetry to setuptools and build - #31
Open
Thorsrud22 wants to merge 2 commits into
Open
Thorsrud22 wants to merge 2 commits into
Thorsrud22 wants to merge 2 commits into
Conversation
The build badge still linked to Travis CI, which the project no longer uses; CI has run on GitHub Actions (cicd.yml) since 2024. Also fix "Or you it in" -> "Or use it in". Closes click-contrib#22
Thorsrud22
force-pushed
the
setuptools-build
branch
from
September 13, 2026 18:56
6de5bea to
1c8bfb6
Compare
Replace the poetry-specific pyproject sections with PEP 621 [project] metadata and the setuptools build backend. Dev tools move to a `dev` extra so `pip install -e .[dev]` sets up a working checkout on any interpreter without a separate tool. CI installs with pip and runs ruff, mypy and pytest directly; the tag release job builds with `python -m build` and uploads with twine using the existing PYPI_TOKEN secret. pytest and mypy floors are raised to currently maintained versions (pytest>=7, mypy>=1.0). ruff stays pinned to 0.3.4 so the lint rule set under select = ["ALL"] is unchanged. Closes click-contrib#21
Thorsrud22
force-pushed
the
setuptools-build
branch
2 times, most recently
from
September 16, 2026 18:25
41555ab to
51866db
Compare
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
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.
Closes #21.
Replaces the poetry configuration with standard PEP 621 metadata and the setuptools build backend, as the issue proposes.
What changes
pyproject.toml:[tool.poetry]becomes[project];poetry-corebecomessetuptools>=61. Runtime dependency (click>=7), Python floor (>=3.8), README, license, author and URLs are carried over unchanged. Classifiers are added since poetry used to derive them.pip install -e .[dev]on any interpreter. pytest and mypy floors are raised to maintained versions (pytest>=7,mypy>=1.0).ruffstays pinned at0.3.4so theselect = ["ALL"]rule set is unchanged.srclayout andpy.typedare declared explicitly via[tool.setuptools].python -m buildand uploads withtwineusing the existingPYPI_TOKENsecret, so no new secrets or trusted-publisher setup is needed..gitignoredrops thepoetry.lockentry.Verified locally on Python 3.8, 3.12 and 3.14:
ruff check,ruff format --check,mypy src/ tests/andpytestall pass, andpython -m buildproduces a wheel containing__init__.py,py.typedand the license, with the same name, version and metadata as before.Not in this PR
poetry.lockwas gitignored), so this keeps the status quo. Happy to add a uv or pip-tools lock in a follow-up if wanted.pyproject.toml. Integrate scm into package versioning #20 (versioning from git tags) is a natural next step now that the backend is setuptools, e.g. viasetuptools-scm.