From 17f0c91896d43b66851229d26385a6989d9e71b2 Mon Sep 17 00:00:00 2001 From: konsti Date: Wed, 30 Jul 2025 14:04:07 +0200 Subject: [PATCH] Show uv_build in projects documentation (#14968) Fix https://github.com/astral-sh/uv/issues/14957 --- docs/concepts/projects/init.md | 12 ++++++------ docs/concepts/projects/workspaces.md | 12 ++++++------ pyproject.toml | 2 ++ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/concepts/projects/init.md b/docs/concepts/projects/init.md index 3a8dd244e..1a012393e 100644 --- a/docs/concepts/projects/init.md +++ b/docs/concepts/projects/init.md @@ -111,8 +111,8 @@ dependencies = [] example-pkg = "example_pkg:main" [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8.3,<0.9.0"] +build-backend = "uv_build" ``` !!! tip @@ -134,8 +134,8 @@ dependencies = [] example-pkg = "example_pkg:main" [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8.3,<0.9.0"] +build-backend = "uv_build" ``` The command can be executed with `uv run`: @@ -195,8 +195,8 @@ requires-python = ">=3.11" dependencies = [] [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8.3,<0.9.0"] +build-backend = "uv_build" ``` !!! tip diff --git a/docs/concepts/projects/workspaces.md b/docs/concepts/projects/workspaces.md index 4b2d670b4..641b4d21f 100644 --- a/docs/concepts/projects/workspaces.md +++ b/docs/concepts/projects/workspaces.md @@ -75,8 +75,8 @@ bird-feeder = { workspace = true } members = ["packages/*"] [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8.3,<0.9.0"] +build-backend = "uv_build" ``` In this example, the `albatross` project depends on the `bird-feeder` project, which is a member of @@ -106,8 +106,8 @@ tqdm = { git = "https://github.com/tqdm/tqdm" } members = ["packages/*"] [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8.3,<0.9.0"] +build-backend = "uv_build" ``` Every workspace member would, by default, install `tqdm` from GitHub, unless a specific member @@ -188,8 +188,8 @@ dependencies = ["bird-feeder", "tqdm>=4,<5"] bird-feeder = { path = "packages/bird-feeder" } [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.8.3,<0.9.0"] +build-backend = "uv_build" ``` This approach conveys many of the same benefits, but allows for more fine-grained control over diff --git a/pyproject.toml b/pyproject.toml index 547c4dd28..a88ff8554 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,6 +87,8 @@ version_files = [ "docs/guides/integration/github.md", "docs/guides/integration/aws-lambda.md", "docs/concepts/build-backend.md", + "docs/concepts/projects/init.md", + "docs/concepts/projects/workspaces.md", ] [tool.mypy]