mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-17 13:58:29 +00:00
Fix include_system_side_packages
typo (#11967)
`s/include_system_side_packages/include_system_site_packages/`
This commit is contained in:
parent
f5acd60ac9
commit
3c81e4121b
2 changed files with 7 additions and 7 deletions
|
@ -40,7 +40,7 @@ pub struct PyVenvConfiguration {
|
||||||
/// Was the virtual environment populated with seed packages?
|
/// Was the virtual environment populated with seed packages?
|
||||||
pub(crate) seed: bool,
|
pub(crate) seed: bool,
|
||||||
/// Should the virtual environment include system site packages?
|
/// Should the virtual environment include system site packages?
|
||||||
pub(crate) include_system_side_packages: bool,
|
pub(crate) include_system_site_packages: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
|
@ -192,7 +192,7 @@ impl PyVenvConfiguration {
|
||||||
let mut uv = false;
|
let mut uv = false;
|
||||||
let mut relocatable = false;
|
let mut relocatable = false;
|
||||||
let mut seed = false;
|
let mut seed = false;
|
||||||
let mut include_system_side_packages = true;
|
let mut include_system_site_packages = true;
|
||||||
|
|
||||||
// Per https://snarky.ca/how-virtual-environments-work/, the `pyvenv.cfg` file is not a
|
// Per https://snarky.ca/how-virtual-environments-work/, the `pyvenv.cfg` file is not a
|
||||||
// valid INI file, and is instead expected to be parsed by partitioning each line on the
|
// valid INI file, and is instead expected to be parsed by partitioning each line on the
|
||||||
|
@ -217,7 +217,7 @@ impl PyVenvConfiguration {
|
||||||
seed = value.trim().to_lowercase() == "true";
|
seed = value.trim().to_lowercase() == "true";
|
||||||
}
|
}
|
||||||
"include-system-site-packages" => {
|
"include-system-site-packages" => {
|
||||||
include_system_side_packages = value.trim().to_lowercase() == "true";
|
include_system_site_packages = value.trim().to_lowercase() == "true";
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ impl PyVenvConfiguration {
|
||||||
uv,
|
uv,
|
||||||
relocatable,
|
relocatable,
|
||||||
seed,
|
seed,
|
||||||
include_system_side_packages,
|
include_system_site_packages,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,8 +253,8 @@ impl PyVenvConfiguration {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if the virtual environment should include system site packages.
|
/// Returns true if the virtual environment should include system site packages.
|
||||||
pub fn include_system_side_packages(&self) -> bool {
|
pub fn include_system_site_packages(&self) -> bool {
|
||||||
self.include_system_side_packages
|
self.include_system_site_packages
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the key-value pair in the `pyvenv.cfg` file.
|
/// Set the key-value pair in the `pyvenv.cfg` file.
|
||||||
|
|
|
@ -931,7 +931,7 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
|
||||||
.is_virtualenv()
|
.is_virtualenv()
|
||||||
.then(|| {
|
.then(|| {
|
||||||
PyVenvConfiguration::parse(base_interpreter.sys_prefix().join("pyvenv.cfg"))
|
PyVenvConfiguration::parse(base_interpreter.sys_prefix().join("pyvenv.cfg"))
|
||||||
.is_ok_and(|cfg| cfg.include_system_side_packages())
|
.is_ok_and(|cfg| cfg.include_system_site_packages())
|
||||||
})
|
})
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue