SIGN IN SIGN UP

build: replace hatchling with the uv_build backend (#980)

Switches the build backend from `hatchling` to `uv_build`, replacing the
`[tool.hatch.build.targets.*]` config with `[tool.uv.build-backend]`.
Only `CHANGELOG.md` and `CONTRIBUTING.md` need an explicit
`source-include` - the module, `pyproject.toml`, README, and LICENSE are
in the sdist by default.

License metadata moves to PEP 639: `license = "Apache-2.0"` plus
`license-files = ["LICENSE"]`. That part is required, not cosmetic:
`uv_build` ships `LICENSE` inside the wheel only when it is declared via
`license-files`, and uv rejects `license-files` combined with the legacy
`license = { file = ... }` table.

The `License :: OSI Approved :: Apache Software License` classifier is
dropped because [PEP 639 deprecates license
classifiers](https://peps.python.org/pep-0639/#deprecate-license-classifiers)
in favor of `License-Expression`, which now carries the same information
("Using license classifier in the `Classifier` Core Metadata field is
deprecated and replaced by the more precise `License-Expression`
field"). See also the [core metadata
spec](https://packaging.python.org/en/latest/specifications/core-metadata/#license-expression).
uv warns about the classifier on every build.

Verified by building sdist + wheel before and after: the wheel contents
are identical, and the metadata differs only in `License-Expression:
Apache-2.0` replacing the inlined license text. The sdist drops
`.gitignore` and gains `pyproject.toml.orig` (uv 0.12 writes a TOML
1.0-compatible `pyproject.toml` into the sdist and keeps the original
alongside it). `uv.lock` is unchanged.

*✍️ Drafted by Claude Code*
V
Vlada Dusek committed
784006e3826473394ac467f3bd4c13973e184428
Parent: 79df065
Committed by GitHub <noreply@github.com> on 7/29/2026, 5:04:19 PM