mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Use dist info name in cache again (#331)
Fixup for the `PackageName`/`DistInfoName` refactor that would lead to invalid cache entries
This commit is contained in:
parent
6d672b8951
commit
3defe233e6
1 changed files with 5 additions and 1 deletions
|
@ -145,7 +145,11 @@ impl RemoteDistribution {
|
||||||
Self::Registry(name, version, _) => {
|
Self::Registry(name, version, _) => {
|
||||||
// https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-dist-info-directory
|
// https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-dist-info-directory
|
||||||
// `version` is normalized by its `ToString` impl
|
// `version` is normalized by its `ToString` impl
|
||||||
format!("{}-{}", PackageName::from(name), version)
|
format!(
|
||||||
|
"{}-{}",
|
||||||
|
PackageName::from(name).as_dist_info_name(),
|
||||||
|
version
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Self::Url(_name, url) => puffin_cache::digest(&CanonicalUrl::new(url)),
|
Self::Url(_name, url) => puffin_cache::digest(&CanonicalUrl::new(url)),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue