mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
handles git repositories
This commit is contained in:
parent
c59c008856
commit
2b2351baeb
1 changed files with 11 additions and 3 deletions
|
@ -197,14 +197,22 @@ impl PexLock {
|
||||||
let Some(sdist_url) = sdist.url().map(|u| u.to_string()) else {
|
let Some(sdist_url) = sdist.url().map(|u| u.to_string()) else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle git dependencies that may not have traditional filenames
|
// Handle git dependencies that may not have traditional filenames
|
||||||
let sdist_filename = if let Some(filename) = sdist.filename() {
|
let sdist_filename = if let Some(filename) = sdist.filename() {
|
||||||
filename.to_string()
|
filename.to_string()
|
||||||
} else if sdist_url.starts_with("git+") {
|
} else if sdist_url.starts_with("git+") {
|
||||||
// Generate a filename for git dependencies
|
// Generate a filename for git dependencies
|
||||||
format!("{}-{}.tar.gz", package.id.name,
|
format!(
|
||||||
package.id.version.as_ref().map(|v| v.to_string()).unwrap_or_else(|| "0.0.0".to_string()))
|
"{}-{}.tar.gz",
|
||||||
|
package.id.name,
|
||||||
|
package
|
||||||
|
.id
|
||||||
|
.version
|
||||||
|
.as_ref()
|
||||||
|
.map(|v| v.to_string())
|
||||||
|
.unwrap_or_else(|| "0.0.0".to_string())
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue