Omit [pip] section from configuration file docs (#6814)

## Summary

Closes https://github.com/astral-sh/uv/issues/6800.
This commit is contained in:
Charlie Marsh 2024-08-29 12:57:13 -04:00 committed by GitHub
parent d62952ec21
commit f2ce80589f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,21 +15,21 @@ In workspaces, uv will begin its search at the workspace root, ignoring any conf
workspace members. Since the workspace is locked as a single unit, configuration is shared across
all members.
If a `pyproject.toml` file is found, uv will read configuration from the `[tool.uv.pip]` table. For
If a `pyproject.toml` file is found, uv will read configuration from the `[tool.uv]` table. For
example, to set a persistent index URL, add the following to a `pyproject.toml`:
```toml title="pyproject.toml"
[tool.uv.pip]
[tool.uv]
index-url = "https://test.pypi.org/simple"
```
(If there is no such table, the `pyproject.toml` file will be ignored, and uv will continue
searching in the directory hierarchy.)
If a `uv.toml` file is found, uv will read from the `[pip]` table. For example:
uv will also search for `uv.toml` files, which follow an identical structure, but omit the
`[tool.uv]` prefix. For example:
```toml title="uv.toml"
[pip]
index-url = "https://test.pypi.org/simple"
```
@ -60,12 +60,21 @@ See the [settings reference](../reference/settings.md) for an enumeration of the
## Configuring the pip interface
A dedicated [`[uv.pip]`](../reference/settings.md#pip) section is provided for configuring _just_
the `uv pip` command line interface. Settings in this section will not apply to `uv` commands
outside of the `uv pip` namespace. However, many of the settings in this section have corollaries in
A dedicated [`[tool.uv.pip]`](../reference/settings.md#pip) section is provided for configuring
_just_ the `uv pip` command line interface. Settings in this section will not apply to `uv` commands
outside the `uv pip` namespace. However, many of the settings in this section have corollaries in
the top-level namespace which _do_ apply to the `uv pip` interface unless they are overridden by a
value in the `uv.pip` section.
The `uv.pip` settings are designed to adhere closely to pip's interface and are declared separately
to retain compatibility while allowing the global settings to use alternate designs (e.g.,
`--no-build`).
As an example, setting the `index-url` under `[tool.uv.pip]`, as in the following `pyproject.toml`,
would only affect the `uv pip` subcommands (e.g., `uv pip install`, but not `uv sync`, `uv lock`, or
`uv run`):
```toml title="pyproject.toml"
[tool.uv.pip]
index-url = "https://test.pypi.org/simple"
```