mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-24 19:22:35 +00:00
Respect index strategy in source distribution builds (#4468)
## Summary The `--index-strategy` is linked to the index locations, which we propagate to source distribution builds; so it makes sense to pass the `--index-strategy` too. While I was here, I made `exclude_newer` a required argument so that we don't forget to set it via the `with_options` builder. Closes https://github.com/astral-sh/uv/issues/4465.
This commit is contained in:
parent
1eee427c94
commit
cba270f750
14 changed files with 130 additions and 123 deletions
|
@ -11,7 +11,8 @@ use uv_build::{SourceBuild, SourceBuildContext};
|
|||
use uv_cache::{Cache, CacheArgs};
|
||||
use uv_client::RegistryClientBuilder;
|
||||
use uv_configuration::{
|
||||
BuildKind, BuildOptions, Concurrency, ConfigSettings, PreviewMode, SetupPyStrategy,
|
||||
BuildKind, BuildOptions, Concurrency, ConfigSettings, IndexStrategy, PreviewMode,
|
||||
SetupPyStrategy,
|
||||
};
|
||||
use uv_dispatch::BuildDispatch;
|
||||
use uv_git::GitResolver;
|
||||
|
@ -59,11 +60,13 @@ pub(crate) async fn build(args: BuildArgs) -> Result<PathBuf> {
|
|||
let client = RegistryClientBuilder::new(cache.clone()).build();
|
||||
let concurrency = Concurrency::default();
|
||||
let config_settings = ConfigSettings::default();
|
||||
let exclude_newer = None;
|
||||
let flat_index = FlatIndex::default();
|
||||
let git = GitResolver::default();
|
||||
let in_flight = InFlight::default();
|
||||
let index = InMemoryIndex::default();
|
||||
let index_urls = IndexLocations::default();
|
||||
let index_strategy = IndexStrategy::default();
|
||||
let setup_py = SetupPyStrategy::default();
|
||||
let toolchain = PythonEnvironment::find(
|
||||
&ToolchainRequest::default(),
|
||||
|
@ -81,11 +84,13 @@ pub(crate) async fn build(args: BuildArgs) -> Result<PathBuf> {
|
|||
&index,
|
||||
&git,
|
||||
&in_flight,
|
||||
index_strategy,
|
||||
setup_py,
|
||||
&config_settings,
|
||||
BuildIsolation::Isolated,
|
||||
install_wheel_rs::linker::LinkMode::default(),
|
||||
&build_options,
|
||||
exclude_newer,
|
||||
concurrency,
|
||||
PreviewMode::Enabled,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue