build: replace hatchling with the uv_build backend and bump uv to 0.12 - #1067
Open
vdusek wants to merge 4 commits into
Open
build: replace hatchling with the uv_build backend and bump uv to 0.12#1067vdusek wants to merge 4 commits into
vdusek wants to merge 4 commits into
Conversation
Also migrates the license metadata to PEP 639 (`license` as an SPDX expression plus `license-files`), which is what uv_build reads to ship LICENSE inside the wheel. The resulting wheel is content-identical to the hatchling one. The `allow-direct-references` hatch setting is dropped - no dependency uses a direct reference.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1067 +/- ##
==========================================
+ Coverage 91.83% 91.89% +0.06%
==========================================
Files 51 51
Lines 3232 3232
==========================================
+ Hits 2968 2970 +2
+ Misses 264 262 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
July 29, 2026 06:50
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.
Switches the build backend from
hatchlingtouv_build, replacing the[tool.hatch.build.targets.*]config with[tool.uv.build-backend]. OnlyCHANGELOG.mdandCONTRIBUTING.mdneed an explicitsource-include- the module,pyproject.toml, README, and LICENSE are in the sdist by default. The[tool.hatch.metadata] allow-direct-referencessetting is dropped, no dependency uses a direct reference.License metadata moves to PEP 639:
license = "Apache-2.0"pluslicense-files = ["LICENSE"]. That part is required, not cosmetic:uv_buildshipsLICENSEinside the wheel only when it is declared vialicense-files, and uv rejectslicense-filescombined with the legacylicense = { file = ... }table.The
License :: OSI Approved :: Apache Software Licenseclassifier is dropped because PEP 639 deprecates license classifiers in favor ofLicense-Expression, which now carries the same information ("Using license classifier in theClassifierCore Metadata field is deprecated and replaced by the more preciseLicense-Expressionfield"). See also the core metadata spec. uv warns about the classifier on every build.The uv guide's Dockerfile now pulls
ghcr.io/astral-sh/uv:0.12(indocs/and in theversion-4.0docs snapshot; theversion-3.4snapshot is left on 0.11).Verified by building sdist + wheel before and after: the wheel contents are identical, and the metadata differs only in
License-Expression: Apache-2.0replacing the inlined license text. The sdist drops.gitignoreand gainspyproject.toml.orig(uv 0.12 writes a TOML 1.0-compatiblepyproject.tomlinto the sdist and keeps the original alongside it).uv.lockis unchanged.✍️ Drafted by Claude Code