uv/docs/concepts
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
..
projects Move "Conflicting dependencies" to the "Resolution" page (#14633) 2025-07-15 16:47:43 -05:00
authentication.md update Git and GitHub Actions docs to mention gh auth login (#13850) 2025-06-05 20:44:59 +00:00
build-backend.md uv init: Make uv_build the default build backend (from hatchling) (#14661) 2025-07-17 17:20:21 -05:00
cache.md Suggest uv cache clean prior to --reinstall (#14659) 2025-07-16 12:02:29 -04:00
configuration-files.md Remove the configuration section in favor of concepts / reference (#13842) 2025-06-05 17:09:49 +00:00
index.md Remove the configuration section in favor of concepts / reference (#13842) 2025-06-05 17:09:49 +00:00
indexes.md Allow users to override index cache-control headers (#14620) 2025-07-15 10:00:04 -04:00
python-versions.md Support transparent Python patch version upgrades (#13954) 2025-06-20 16:17:13 +02:00
resolution.md Move "Conflicting dependencies" to the "Resolution" page (#14633) 2025-07-15 16:47:43 -05:00
tools.md feature: shorthand for --with (-w) in uvx and uv tool run (#14530) 2025-07-10 13:50:50 -05:00