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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user