mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
add docs for dependency group requires-python
This commit is contained in:
parent
469246d177
commit
9cd28fba2e
1 changed files with 13 additions and 0 deletions
|
@ -701,6 +701,19 @@ default-groups = "all"
|
|||
To disable this behaviour during `uv run` or `uv sync`, use `--no-default-groups`.
|
||||
To exclude a specific default group, use `--no-group <name>`.
|
||||
|
||||
### Group `requires-python`
|
||||
|
||||
If your dependency groups require a higher version of python than your project does, you can specify
|
||||
a `requires-python` for the group in `[tool.uv.dependency-groups]` as follows:
|
||||
|
||||
```toml title="pyproject.toml"
|
||||
[dependency-groups]
|
||||
dev = ["pytest"]
|
||||
|
||||
[tool.uv.dependency-groups]
|
||||
dev = {requires-python = ">=3.12"}
|
||||
```
|
||||
|
||||
### Legacy `dev-dependencies`
|
||||
|
||||
Before `[dependency-groups]` was standardized, uv used the `tool.uv.dev-dependencies` field to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue