Skip to content

Commit

Permalink
Omit [pip] section from configuration file docs (#6814)
Browse files Browse the repository at this point in the history
## Summary

Closes #6800.
  • Loading branch information
charliermarsh authored Aug 29, 2024
1 parent d62952e commit f2ce805
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions docs/configuration/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

Expand Down Expand Up @@ -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"
```

0 comments on commit f2ce805

Please sign in to comment.