mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +00:00
Remove double-download for source distributions (#1218)
## Summary Oops -- this was using a different cache key than the route above (this is the wheel _metadata_ route vs. the wheel build route), so we were saving and building source distributions twice in `pip install`.
This commit is contained in:
parent
51e8609ee8
commit
8cbe1d220c
1 changed files with 4 additions and 5 deletions
|
@ -15,8 +15,8 @@ use zip::ZipArchive;
|
|||
|
||||
use distribution_filename::WheelFilename;
|
||||
use distribution_types::{
|
||||
DirectArchiveUrl, DirectGitUrl, Dist, FileLocation, GitSourceDist, Identifier, LocalEditable,
|
||||
Name, PathSourceDist, RemoteSource, SourceDist,
|
||||
DirectArchiveUrl, DirectGitUrl, Dist, FileLocation, GitSourceDist, LocalEditable, Name,
|
||||
PathSourceDist, RemoteSource, SourceDist,
|
||||
};
|
||||
use install_wheel_rs::read_dist_info;
|
||||
use pep508_rs::VerbatimUrl;
|
||||
|
@ -203,13 +203,12 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> {
|
|||
}
|
||||
};
|
||||
|
||||
// For registry source distributions, shard by package, then by SHA.
|
||||
// Ex) `pypi/requests/a673187abc19fe6c`
|
||||
// For registry source distributions, shard by package, then version.
|
||||
let cache_shard = self.build_context.cache().shard(
|
||||
CacheBucket::BuiltWheels,
|
||||
WheelCache::Index(®istry_source_dist.index)
|
||||
.remote_wheel_dir(registry_source_dist.filename.name.as_ref())
|
||||
.join(®istry_source_dist.file.distribution_id().as_str()[..16]),
|
||||
.join(registry_source_dist.filename.version.to_string()),
|
||||
);
|
||||
|
||||
self.url_metadata(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue