From daeb3fce3955920dc6f9b3a7e3f3e659063a9ab7 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 29 Jul 2026 08:37:24 +0200 Subject: [PATCH 1/2] build: replace hatchling with the uv_build backend 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. --- pyproject.toml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ebeda4b..0638a00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,20 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build"] +build-backend = "uv_build" [project] name = "apify_shared" version = "2.2.2" description = "Tools and constants shared across Apify projects." authors = [{ name = "Apify Technologies s.r.o.", email = "support@apify.com" }] -license = { file = "LICENSE" } +license = "Apache-2.0" +license-files = ["LICENSE"] readme = "README.md" requires-python = ">=3.10" classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -55,15 +55,9 @@ dev = [ "ty~=0.0.0", ] -[tool.hatch.build.targets.sdist] -only-include = [ - "src/apify_shared", - "CHANGELOG.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "pyproject.toml", -] +# The module, pyproject.toml, README, and LICENSE are included in the sdist by default. +[tool.uv.build-backend] +source-include = ["CHANGELOG.md", "CONTRIBUTING.md"] [tool.ruff] line-length = 120 From babc7740cbac3f2eb4072a5916493fa09c88853e Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 29 Jul 2026 08:42:22 +0200 Subject: [PATCH 2/2] build: move the sdist include comment inside the uv build-backend section --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0638a00..2783e80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,8 +55,8 @@ dev = [ "ty~=0.0.0", ] -# The module, pyproject.toml, README, and LICENSE are included in the sdist by default. [tool.uv.build-backend] +# The module, pyproject.toml, README, and LICENSE are included in the sdist by default. source-include = ["CHANGELOG.md", "CONTRIBUTING.md"] [tool.ruff]