mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Allow URL requirements in editable installs (#1614)
## Summary If an editable package declares a direct URL requirement, we currently error since it's not considered an "allowed" requirement. We need to add those URLs to the allow-list. Closes https://github.com/astral-sh/uv/issues/1603.
This commit is contained in:
parent
8675f66e74
commit
5c4cecaa85
6 changed files with 75 additions and 7 deletions
|
@ -180,12 +180,17 @@ impl<'a, Provider: ResolverProvider> Resolver<'a, Provider> {
|
|||
None
|
||||
}
|
||||
})
|
||||
.chain(
|
||||
manifest
|
||||
.editables
|
||||
.iter()
|
||||
.map(|(editable, _)| editable.raw()),
|
||||
)
|
||||
.chain(manifest.editables.iter().flat_map(|(editable, metadata)| {
|
||||
std::iter::once(editable.raw()).chain(metadata.requires_dist.iter().filter_map(
|
||||
|req| {
|
||||
if let Some(pep508_rs::VersionOrUrl::Url(url)) = &req.version_or_url {
|
||||
Some(url.raw())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
))
|
||||
}))
|
||||
.collect();
|
||||
|
||||
// Determine the allowed yanked package versions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue