uv/docs
konsti 3c9aea87b4 `uv init`: Make `uv_build` the default build backend (from `hatchling`) (#14661)
Closes https://github.com/astral-sh/uv/issues/14298

Switch the default build backend for `uv init` from `hatchling` to
`uv_build`.

This change affects the following two commands:

* `uv init --lib`
* `uv init [--app] --package`

It does not affect `uv init` or `uv init --app` without `--package`. `uv
init --build-backend <...>` also works as before.

**Before**

```
$ uv init --lib project
$ cat project/pyproject.toml
[project]
name = "project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
    { name = "konstin", email = "konstin@mailbox.org" }
]
requires-python = ">=3.13.2"
dependencies = []

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
```

**After**

```
$ uv init --lib project
$ cat project/pyproject.toml
[project]
name = "project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
    { name = "konstin", email = "konstin@mailbox.org" }
]
requires-python = ">=3.13.2"
dependencies = []

[build-system]
requires = ["uv_build>=0.7.20,<0.8"]
build-backend = "uv_build"
```

I cleaned up some tests for consistency in the second commit.
2025-07-17 17:20:21 -05:00
..
.overrides Add ``last updated`` for document (#11164) 2025-02-03 22:28:47 -05:00
assets Add `static` assets to docs pages (#6951) 2024-09-02 20:00:30 -04:00
concepts `uv init`: Make `uv_build` the default build backend (from `hatchling`) (#14661) 2025-07-17 17:20:21 -05:00
getting-started Bump version to 0.7.22 (#14685) 2025-07-17 11:27:15 -05:00
guides feat(docker): set default `UV_TOOL_BIN_DIR` on docker images (#13391) 2025-07-17 17:20:21 -05:00
js Rename "Dependency specifiers" section to exclude PEP 508 reference (#14631) 2025-07-15 12:55:57 -05:00
pip docs: add missing backtick (#14654) 2025-07-16 13:44:29 +00:00
reference Default to `--workspace` when adding subdirectories (#14529) 2025-07-17 17:20:21 -05:00
stylesheets Remove the last edited date from documentation pages (#11753) 2025-02-24 13:27:00 -06:00
.gitignore Add structured documentation (#4426) 2024-06-26 11:28:42 -05:00
index.md Fix PowerShell code blocks (#13511) 2025-05-17 21:06:48 -05:00
requirements-insiders.in Reference the root requirements from the insiders requirements file (#5105) 2024-07-16 09:51:16 -05:00
requirements-insiders.txt Add an `llms.txt` to uv (#13929) 2025-06-10 07:46:49 -04:00
requirements.in Add an `llms.txt` to uv (#13929) 2025-06-10 07:46:49 -04:00
requirements.txt Add an `llms.txt` to uv (#13929) 2025-06-10 07:46:49 -04:00