From 2ef46faceedc6017848fa740540fb5ca96068b90 Mon Sep 17 00:00:00 2001 From: Chaojie Date: Tue, 26 Mar 2024 21:57:57 +0800 Subject: [PATCH] Fix tests --- rye/src/installer.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/rye/src/installer.rs b/rye/src/installer.rs index 5b35588290..dce3340b9d 100644 --- a/rye/src/installer.rs +++ b/rye/src/installer.rs @@ -15,7 +15,7 @@ use crate::bootstrap::{ensure_self_venv, fetch, FetchOptions}; use crate::config::Config; use crate::consts::VENV_BIN; use crate::platform::get_app_dir; -use crate::pyproject::{normalize_package_name, read_venv_marker, ExpandedSources, PyProject}; +use crate::pyproject::{normalize_package_name, read_venv_marker, ExpandedSources}; use crate::sources::py::PythonVersionRequest; use crate::sync::{create_virtualenv, VenvMarker}; use crate::utils::{ @@ -110,7 +110,6 @@ pub fn install( extra_requirements: &[Requirement], output: CommandOutput, ) -> Result<(), Error> { - let pyproject = PyProject::discover()?; let config = Config::current(); let sources = ExpandedSources::from_sources(&config.sources()?)?; let app_dir = get_app_dir(); @@ -140,7 +139,7 @@ pub fn install( &py_ver, &target_venv_path, requirement.name.as_str(), - pyproject.system_site_packages(), + false, )?; if config.use_uv() { @@ -148,13 +147,7 @@ pub fn install( .with_output(output.quieter()) .with_sources(sources) .ensure_exists()? - .venv( - &target_venv_path, - &py, - &py_ver, - None, - pyproject.system_site_packages(), - )? + .venv(&target_venv_path, &py, &py_ver, None, false)? .with_output(output) .install( &requirement,