mirror of https://github.com/astral-sh/uv
Omit `[pip]` section from configuration file docs (#6814)
## Summary Closes https://github.com/astral-sh/uv/issues/6800.
This commit is contained in:
parent
d62952ec21
commit
f2ce80589f
|
|
@ -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
|
workspace members. Since the workspace is locked as a single unit, configuration is shared across
|
||||||
all members.
|
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`:
|
example, to set a persistent index URL, add the following to a `pyproject.toml`:
|
||||||
|
|
||||||
```toml title="pyproject.toml"
|
```toml title="pyproject.toml"
|
||||||
[tool.uv.pip]
|
[tool.uv]
|
||||||
index-url = "https://test.pypi.org/simple"
|
index-url = "https://test.pypi.org/simple"
|
||||||
```
|
```
|
||||||
|
|
||||||
(If there is no such table, the `pyproject.toml` file will be ignored, and uv will continue
|
(If there is no such table, the `pyproject.toml` file will be ignored, and uv will continue
|
||||||
searching in the directory hierarchy.)
|
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"
|
```toml title="uv.toml"
|
||||||
[pip]
|
|
||||||
index-url = "https://test.pypi.org/simple"
|
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
|
## Configuring the pip interface
|
||||||
|
|
||||||
A dedicated [`[uv.pip]`](../reference/settings.md#pip) section is provided for configuring _just_
|
A dedicated [`[tool.uv.pip]`](../reference/settings.md#pip) section is provided for configuring
|
||||||
the `uv pip` command line interface. Settings in this section will not apply to `uv` commands
|
_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
|
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
|
the top-level namespace which _do_ apply to the `uv pip` interface unless they are overridden by a
|
||||||
value in the `uv.pip` section.
|
value in the `uv.pip` section.
|
||||||
|
|
||||||
The `uv.pip` settings are designed to adhere closely to pip's interface and are declared separately
|
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.,
|
to retain compatibility while allowing the global settings to use alternate designs (e.g.,
|
||||||
`--no-build`).
|
`--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"
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue