Skip to content

Commit

Permalink
Some reverts
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jul 29, 2024
1 parent ed464d0 commit ac91d4e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
10 changes: 0 additions & 10 deletions crates/uv-python/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,6 @@ impl PythonEnvironment {
})))
}

/// Create a [`PythonEnvironment`] from an existing [`Interpreter`] with relocatable paths.
#[must_use]
pub fn with_relocatable(self) -> Self {
let inner = Arc::unwrap_or_clone(self.0);
Self(Arc::new(PythonEnvironmentShared {
interpreter: inner.interpreter.with_relocatable(),
..inner
}))
}

/// Returns the root (i.e., `prefix`) of the Python interpreter.
pub fn root(&self) -> &Path {
&self.0.root
Expand Down
12 changes: 0 additions & 12 deletions crates/uv-python/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub struct Interpreter {
prefix: Option<Prefix>,
pointer_size: PointerSize,
gil_disabled: bool,
relocatable: bool,
}

impl Interpreter {
Expand Down Expand Up @@ -76,7 +75,6 @@ impl Interpreter {
tags: OnceLock::new(),
target: None,
prefix: None,
relocatable: false,
})
}

Expand Down Expand Up @@ -111,15 +109,6 @@ impl Interpreter {
})
}

/// Return a new [`Interpreter`] that should be treated as relocatable.
#[must_use]
pub fn with_relocatable(self) -> Self {
Self {
relocatable: true,
..self
}
}

/// Return the [`Interpreter`] for the base executable, if it's available.
///
/// If no such base executable is available, or if the base executable is the same as the
Expand Down Expand Up @@ -437,7 +426,6 @@ impl Interpreter {
},
}
},
relocatable: self.relocatable,
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/uv/src/commands/project/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ impl CachedEnvironment {
uv_virtualenv::Prompt::None,
false,
false,
false,
true,
)?;
sync_environment(
venv.with_relocatable(),
venv,
&resolution,
settings.as_ref().into(),
state,
Expand Down

0 comments on commit ac91d4e

Please sign in to comment.