Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

Commit 831e7a3

Browse files
authored
build: replace hatchling with the uv_build backend (#77)
Switches the build backend from `hatchling` to `uv_build`, replacing `[tool.hatch.build.targets.sdist]` 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. Part of the same sweep as apify/crawlee-python#2098, apify/apify-sdk-python#1067, and apify/apify-client-python#980. *✍️ Drafted by Claude Code*
1 parent 63e9f00 commit 831e7a3

1 file changed

Lines changed: 7 additions & 13 deletions

File tree

‎pyproject.toml‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
2+
requires = ["uv_build"]
3+
build-backend = "uv_build"
44

55
[project]
66
name = "apify_shared"
77
version = "2.2.2"
88
description = "Tools and constants shared across Apify projects."
99
authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }]
10-
license = { file = "LICENSE" }
10+
license = "Apache-2.0"
11+
license-files = ["LICENSE"]
1112
readme = "README.md"
1213
requires-python = ">=3.10"
1314
classifiers = [
1415
"Development Status :: 5 - Production/Stable",
1516
"Environment :: Console",
1617
"Intended Audience :: Developers",
17-
"License :: OSI Approved :: Apache Software License",
1818
"Operating System :: OS Independent",
1919
"Programming Language :: Python :: 3.10",
2020
"Programming Language :: Python :: 3.11",
@@ -55,15 +55,9 @@ dev = [
5555
"ty~=0.0.0",
5656
]
5757

58-
[tool.hatch.build.targets.sdist]
59-
only-include = [
60-
"src/apify_shared",
61-
"CHANGELOG.md",
62-
"CONTRIBUTING.md",
63-
"LICENSE",
64-
"README.md",
65-
"pyproject.toml",
66-
]
58+
[tool.uv.build-backend]
59+
# The module, pyproject.toml, README, and LICENSE are included in the sdist by default.
60+
source-include = ["CHANGELOG.md", "CONTRIBUTING.md"]
6761

6862
[tool.ruff]
6963
line-length = 120

0 commit comments

Comments
 (0)