mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add [tool.uv.dependency-groups].mygroup.requires-python
(#13735)
This allows you to specify requires-python on individual dependency-groups, with the intended usecase being "oh my dev-dependencies have a higher requires-python than my actual project". This includes a large driveby move of the RequiresPython type to uv-distribution-types to allow us to generate the appropriate markers at this point in the code. It also migrates RequiresPython from pubgrub::Range to version_ranges::Ranges, and makes several pub(crate) items pub, as it's no longer defined in uv_resolver. Fixes #11606
This commit is contained in:
parent
26db29caac
commit
5021840919
54 changed files with 2072 additions and 538 deletions
|
@ -127,6 +127,31 @@ default-groups = ["docs"]
|
|||
|
||||
---
|
||||
|
||||
### [`dependency-groups`](#dependency-groups) {: #dependency-groups }
|
||||
|
||||
Additional settings for `dependency-groups`.
|
||||
|
||||
Currently this can only be used to add `requires-python` constraints
|
||||
to dependency groups (typically to inform uv that your dev tooling
|
||||
has a higher python requirement than your actual project).
|
||||
|
||||
This cannot be used to define dependency groups, use the top-level
|
||||
`[dependency-groups]` table for that.
|
||||
|
||||
**Default value**: `[]`
|
||||
|
||||
**Type**: `dict`
|
||||
|
||||
**Example usage**:
|
||||
|
||||
```toml title="pyproject.toml"
|
||||
|
||||
[tool.uv.dependency-groups]
|
||||
my-group = {requires-python = ">=3.12"}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### [`dev-dependencies`](#dev-dependencies) {: #dev-dependencies }
|
||||
|
||||
The project's development dependencies.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue