mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +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
|
@ -1,5 +1,4 @@
|
|||
use url::Url;
|
||||
|
||||
use uv_git::{GitReference, GitResolver};
|
||||
use uv_pep508::VerbatimUrl;
|
||||
use uv_pypi_types::{ParsedGitUrl, ParsedUrl, VerbatimParsedUrl};
|
||||
|
@ -17,9 +16,8 @@ pub(crate) fn url_to_precise(url: VerbatimParsedUrl, git: &GitResolver) -> Verba
|
|||
let Some(new_git_url) = git.precise(git_url.clone()) else {
|
||||
debug_assert!(
|
||||
matches!(git_url.reference(), GitReference::FullCommit(_)),
|
||||
"Unseen Git URL: {}, {:?}",
|
||||
"Unseen Git URL: {}, {git_url:?}",
|
||||
url.verbatim,
|
||||
git_url
|
||||
);
|
||||
return url;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue