Repository navigation
Move the package metadata to pyproject.toml - #70
Merged
stefankoegl merged 1 commit intoNov 11, 2026
Merged
stefankoegl merged 1 commit into
stefankoegl merged 1 commit into
Conversation
- pyproject.toml holds all metadata. The version is still defined only
in kdtree.py and read statically by setuptools (attr), instead of
setup.py parsing kdtree.py with regular expressions.
- The license is given as SPDX expression ("ISC", PEP 639) instead of
the license classifier, which setuptools deprecates and warns about.
This requires setuptools >= 77 at build time.
- Project URLs for the docs, repository and issues are added.
- setup.py only remains for the build_py command that installs the
type stubs, which setuptools can't express declaratively.
- The coverage configuration moves from setup.cfg (removed) to
pyproject.toml.
- test_typing.py no longer runs the deprecated "setup.py build_py". It
builds an sdist and a wheel with "python -m build --no-isolation", as
a release does, and checks the stubs, version and license in the
wheel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pewzpiih3qbqQ1YhUbhbvk
stefankoegl
merged commit Nov 11, 2026
5ef566d
into
claude/vibrant-dijkstra-6s8trl-pypi-readme
16 checks passed
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.
Builds on #69. Both PRs change the package metadata, so this one uses #69's branch as its base and shows only its own diff. When #69 is merged and its branch is deleted, GitHub retargets this PR to
master.Changes
pyproject.toml(new): holds all metadata.kdtree.py. setuptools reads it statically viaattr, instead ofsetup.pyparsingkdtree.pywith regular expressions.ISC(PEP 639), replacing theLicense :: OSI Approved :: ISC License (ISCL)classifier. setuptools deprecated that classifier and printed a warning box on every build. This needs setuptools ≥ 77 at build time, declared in[build-system].setup.py: only thebuild_pycommand that installskdtree.pyiandkdtree-stubs/__init__.pyiremains. setuptools has no declarative way to do this for a single-file module.setup.cfg: removed. The coverage settings moved to[tool.coverage.*]inpyproject.toml.test_typing.py: no longer runs the deprecatedsetup.py build_py. It builds an sdist and a wheel withpython -m build --no-isolation, as a release does, then checks:Versionmatcheskdtree.__version__License-ExpressionisISCThe CI typing job already installs
buildandsetuptools.Testing
fail_under = 100, frompyproject.toml.python -m buildbuilds without the license deprecation warning, andtwine checkpasses.mypy --strictandpyrightontyping_sample.pyagainst it, as the CI typing job does: no issues. The installed metadata reports0.17andISC.Note
setuptools still warns
standard file not found: should have one of README, ..., README.mdbecause the file is calledreadme.mdin lowercase. It is included and used anyway. Renaming it would silence the warning, but it would touch every PR that edits the readme, so I left it.Generated by Claude Code