From be81b506fd0d7b42b92fb3a2b603aee78474735d Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Tue, 28 Jul 2026 22:25:23 +0200 Subject: [PATCH 1/3] 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 | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4407c152..a1d483ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,20 +1,20 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.12.0,<0.13.0"] +build-backend = "uv_build" [project] name = "apify_client" version = "3.1.1" description = "Apify API client for Python" 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.11" 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.11", "Programming Language :: Python :: 3.12", @@ -67,18 +67,9 @@ dev = [ "werkzeug<4.0.0", # Werkzeug is used by pytest-httpserver ] -[tool.hatch.build.targets.wheel] -packages = ["src/apify_client"] - -[tool.hatch.build.targets.sdist] -only-include = [ - "src/apify_client", - "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 8ab4cfead903b2d2fac778de863b955c7a705816 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 29 Jul 2026 08:21:53 +0200 Subject: [PATCH 2/3] build: drop the version constraint on the uv_build requirement --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a1d483ba..47d09be2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["uv_build>=0.12.0,<0.13.0"] +requires = ["uv_build"] build-backend = "uv_build" [project] From 3d377debd673a1f732fd5a7a9ea90789b0ecafc7 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Wed, 29 Jul 2026 08:42:20 +0200 Subject: [PATCH 3/3] 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 47d09be2..3051eb6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,8 +67,8 @@ dev = [ "werkzeug<4.0.0", # Werkzeug is used by pytest-httpserver ] -# 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]