Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/uv-resolver/src/resolution/requirements_txt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<'dist> RequirementsTxtDist<'dist> {
}
}

// If the URL is not _definitively_ an absolute `file://` URL, write it as a relative path.
// If the URL is not _definitively_ a `file://` URL, write it as a relative path.
if self.dist.is_local() {
if let VersionOrUrlRef::Url(url) = self.dist.version_or_url() {
let given = url.verbatim();
Expand All @@ -72,11 +72,12 @@ impl<'dist> RequirementsTxtDist<'dist> {
{
Some(Cow::Owned(path.to_string()))
} else {
// Ex) `file:///flask-3.0.3-py3-none-any.whl`
None
}
} else {
// Ex) `file:./flask-3.0.3-py3-none-any.whl`
Some(given)
None
}
}
Some(_) => None,
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/tests/it/pip_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2887,7 +2887,7 @@ fn compile_wheel_path_dependency() -> Result<()> {
# via flask
click==8.1.7
# via flask
file:flask-3.0.0-py3-none-any.whl
flask @ file:flask-3.0.0-py3-none-any.whl
# via -r requirements.in
itsdangerous==2.1.2
# via flask
Expand Down