build: replace hatchling with the uv_build backend - #980
Open
vdusek wants to merge 3 commits into
Open
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #980 +/- ##
=======================================
Coverage 94.62% 94.62%
=======================================
Files 58 58
Lines 5248 5248
=======================================
Hits 4966 4966
Misses 282 282
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
janbuchar
approved these changes
Jul 29, 2026
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.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.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