Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ischaojie committed Mar 26, 2024
1 parent 0c9523f commit 60d30db
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions rye/src/installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -140,21 +139,15 @@ pub fn install(
&py_ver,
&target_venv_path,
requirement.name.as_str(),
pyproject.system_site_packages(),
false,
)?;

if config.use_uv() {
let result = UvBuilder::new()
.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,
Expand Down

0 comments on commit 60d30db

Please sign in to comment.