Allow file: URLs to include package names (#9493)
## Summary Closes https://github.com/astral-sh/uv/issues/9489.
This commit is contained in:
@@ -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();
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user