Respect cached local --find-links in install plan (#2907)

## Summary

I think this is kind of just an oversight. If a wheel is available via
`--find-links`, and the index is "local", we never find it in the cache.

## Test Plan

`cargo test`
This commit is contained in:
Charlie Marsh 2024-04-08 14:58:33 -04:00 committed by GitHub
parent 31a67f539f
commit 134810c547
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 53 additions and 3 deletions

View file

@ -150,10 +150,9 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context>
Url::parse(url).map_err(|err| Error::Url(url.clone(), err))?
}
FileLocation::Path(path) => {
let url = Url::from_file_path(path).expect("path is absolute");
let cache_entry = self.build_context.cache().entry(
CacheBucket::Wheels,
WheelCache::Url(&url).wheel_dir(wheel.name().as_ref()),
WheelCache::Index(&wheel.index).wheel_dir(wheel.name().as_ref()),
wheel.filename.stem(),
);
return self