mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-28 18:54:10 +00:00
Add --no-sources to avoid reading from tool.uv.sources (#5801)
## Summary Closes https://github.com/astral-sh/uv/issues/5791.
This commit is contained in:
parent
478d32c655
commit
089f50a845
27 changed files with 455 additions and 40 deletions
|
|
@ -17,7 +17,8 @@ use uv_build::{SourceBuild, SourceBuildContext};
|
|||
use uv_cache::Cache;
|
||||
use uv_client::RegistryClient;
|
||||
use uv_configuration::{
|
||||
BuildKind, BuildOptions, ConfigSettings, Constraints, IndexStrategy, Reinstall, SetupPyStrategy,
|
||||
BuildKind, BuildOptions, ConfigSettings, Constraints, IndexStrategy, Reinstall,
|
||||
SetupPyStrategy, SourceStrategy,
|
||||
};
|
||||
use uv_configuration::{Concurrency, PreviewMode};
|
||||
use uv_distribution::DistributionDatabase;
|
||||
|
|
@ -51,6 +52,7 @@ pub struct BuildDispatch<'a> {
|
|||
exclude_newer: Option<ExcludeNewer>,
|
||||
source_build_context: SourceBuildContext,
|
||||
build_extra_env_vars: FxHashMap<OsString, OsString>,
|
||||
sources: SourceStrategy,
|
||||
concurrency: Concurrency,
|
||||
preview_mode: PreviewMode,
|
||||
}
|
||||
|
|
@ -73,6 +75,7 @@ impl<'a> BuildDispatch<'a> {
|
|||
link_mode: install_wheel_rs::linker::LinkMode,
|
||||
build_options: &'a BuildOptions,
|
||||
exclude_newer: Option<ExcludeNewer>,
|
||||
sources: SourceStrategy,
|
||||
concurrency: Concurrency,
|
||||
preview_mode: PreviewMode,
|
||||
) -> Self {
|
||||
|
|
@ -93,9 +96,10 @@ impl<'a> BuildDispatch<'a> {
|
|||
link_mode,
|
||||
build_options,
|
||||
exclude_newer,
|
||||
concurrency,
|
||||
source_build_context: SourceBuildContext::default(),
|
||||
build_extra_env_vars: FxHashMap::default(),
|
||||
sources,
|
||||
concurrency,
|
||||
preview_mode,
|
||||
}
|
||||
}
|
||||
|
|
@ -131,6 +135,10 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
self.build_options
|
||||
}
|
||||
|
||||
fn sources(&self) -> SourceStrategy {
|
||||
self.sources
|
||||
}
|
||||
|
||||
fn index_locations(&self) -> &IndexLocations {
|
||||
self.index_locations
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue