Skip to content

Commit

Permalink
Support path-based dependencies in virtual projects with uv enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpryer committed Feb 29, 2024
1 parent 2111778 commit 50c8cfd
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions rye/src/cli/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,21 +470,8 @@ fn resolve_requirements_with_uv(
}
let sources = ExpandedSources::from_sources(&pyproject_toml.sources()?)?;
sources.add_as_pip_args(&mut cmd);
let mut child = cmd
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.stderr(Stdio::piped())
.spawn()?;
let child_stdin = child.stdin.as_mut().unwrap();
writeln!(child_stdin, "{}", req)?;

let rv = child.wait_with_output()?;
if !rv.status.success() {
let log = String::from_utf8_lossy(&rv.stderr);
bail!("failed to resolve packages:\n{}", log);
}

let mut new_req: Requirement = String::from_utf8_lossy(&rv.stdout).parse()?;
let mut new_req = req.clone();
if let Some(ref mut version_or_url) = new_req.version_or_url {
if let VersionOrUrl::VersionSpecifier(ref mut specs) = version_or_url {
*version_or_url = VersionOrUrl::VersionSpecifier(VersionSpecifiers::from_iter({
Expand Down

0 comments on commit 50c8cfd

Please sign in to comment.