Move cache sharding below prepare_metadata_for_build_wheel (#15029)
## Summary No change in behavior. This logic just isn't needed until the next block, and as-written, it's hard to tell.
This commit is contained in:
@@ -629,15 +629,6 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
||||
}
|
||||
}
|
||||
|
||||
// If there are build settings or extra build dependencies, we need to scope to a cache shard.
|
||||
let config_settings = self.config_settings_for(source.name());
|
||||
let extra_build_deps = self.extra_build_dependencies_for(source.name());
|
||||
let cache_shard = if config_settings.is_empty() && extra_build_deps.is_empty() {
|
||||
cache_shard
|
||||
} else {
|
||||
cache_shard.shard(cache_digest(&(&config_settings, extra_build_deps)))
|
||||
};
|
||||
|
||||
// Otherwise, we either need to build the metadata.
|
||||
// If the backend supports `prepare_metadata_for_build_wheel`, use it.
|
||||
if let Some(metadata) = self
|
||||
@@ -674,6 +665,15 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
||||
});
|
||||
}
|
||||
|
||||
// If there are build settings or extra build dependencies, we need to scope to a cache shard.
|
||||
let config_settings = self.config_settings_for(source.name());
|
||||
let extra_build_deps = self.extra_build_dependencies_for(source.name());
|
||||
let cache_shard = if config_settings.is_empty() && extra_build_deps.is_empty() {
|
||||
cache_shard
|
||||
} else {
|
||||
cache_shard.shard(cache_digest(&(&config_settings, extra_build_deps)))
|
||||
};
|
||||
|
||||
let task = self
|
||||
.reporter
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user