mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-31 07:47:27 +00:00
Remove interpreter from BuildContext
trait (#5800)
This commit is contained in:
parent
92a2996e8e
commit
33ec6f063d
3 changed files with 3 additions and 11 deletions
|
@ -18,7 +18,7 @@ use uv_dispatch::BuildDispatch;
|
|||
use uv_git::GitResolver;
|
||||
use uv_python::{EnvironmentPreference, PythonEnvironment, PythonRequest};
|
||||
use uv_resolver::{FlatIndex, InMemoryIndex};
|
||||
use uv_types::{BuildContext, BuildIsolation, InFlight};
|
||||
use uv_types::{BuildIsolation, InFlight};
|
||||
|
||||
#[derive(Parser)]
|
||||
pub(crate) struct BuildArgs {
|
||||
|
@ -100,7 +100,7 @@ pub(crate) async fn build(args: BuildArgs) -> Result<PathBuf> {
|
|||
let builder = SourceBuild::setup(
|
||||
&args.sdist,
|
||||
args.subdirectory.as_deref(),
|
||||
build_dispatch.interpreter(),
|
||||
python.interpreter(),
|
||||
&build_dispatch,
|
||||
SourceBuildContext::default(),
|
||||
args.sdist.display().to_string(),
|
||||
|
|
|
@ -127,10 +127,6 @@ impl<'a> BuildContext for BuildDispatch<'a> {
|
|||
self.git
|
||||
}
|
||||
|
||||
fn interpreter(&self) -> &Interpreter {
|
||||
self.interpreter
|
||||
}
|
||||
|
||||
fn build_options(&self) -> &BuildOptions {
|
||||
self.build_options
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ use pypi_types::Requirement;
|
|||
use uv_cache::Cache;
|
||||
use uv_configuration::{BuildKind, BuildOptions};
|
||||
use uv_git::GitResolver;
|
||||
use uv_python::{Interpreter, PythonEnvironment};
|
||||
use uv_python::PythonEnvironment;
|
||||
|
||||
/// Avoids cyclic crate dependencies between resolver, installer and builder.
|
||||
///
|
||||
|
@ -57,10 +57,6 @@ pub trait BuildContext {
|
|||
/// Return a reference to the Git resolver.
|
||||
fn git(&self) -> &GitResolver;
|
||||
|
||||
/// All (potentially nested) source distribution builds use the same base python and can reuse
|
||||
/// it's metadata (e.g. wheel compatibility tags).
|
||||
fn interpreter(&self) -> &Interpreter;
|
||||
|
||||
/// Whether source distribution building or pre-built wheels is disabled.
|
||||
///
|
||||
/// This [`BuildContext::setup_build`] calls will fail if builds are disabled.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue