mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-02 04:48:18 +00:00
Allow dependency metadata entries for direct URL requirements (#7846)
## Summary This is part of making https://github.com/astral-sh/uv/issues/7299#issuecomment-2385286341 better. You can now use `tool.uv.dependency-metadata` for direct URL requirements. Unfortunately, you _must_ include a version, since we need one to perform resolution.
This commit is contained in:
parent
d6d6de8769
commit
cc734ea2b6
10 changed files with 341 additions and 28 deletions
|
|
@ -855,3 +855,9 @@ You could run the following sequence of commands to sync `flash-attn`:
|
|||
$ uv sync --extra build
|
||||
$ uv sync --extra build --extra compile
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
The `version` field in `tool.uv.dependency-metadata` is optional for registry-based
|
||||
dependencies (when omitted, uv will assume the metadata applies to all versions of the package),
|
||||
but _required_ for direct URL dependencies (like Git dependencies).
|
||||
|
|
|
|||
|
|
@ -313,6 +313,12 @@ package's metadata is incorrect or incomplete, or when a package is not availabl
|
|||
index. While dependency overrides allow overriding the allowed versions of a package globally,
|
||||
metadata overrides allow overriding the declared metadata of a _specific package_.
|
||||
|
||||
!!! note
|
||||
|
||||
The `version` field in `tool.uv.dependency-metadata` is optional for registry-based
|
||||
dependencies (when omitted, uv will assume the metadata applies to all versions of the package),
|
||||
but _required_ for direct URL dependencies (like Git dependencies).
|
||||
|
||||
Entries in the `tool.uv.dependency-metadata` table follow the
|
||||
[Metadata 2.3](https://packaging.python.org/en/latest/specifications/core-metadata/) specification,
|
||||
though only `name`, `version`, `requires-dist`, `requires-python`, and `provides-extra` are read by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue