mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-01 14:31:12 +00:00
Use ParsedGitUrl
to recreate Git source kind URL (#3647)
This commit is contained in:
parent
e2d7d2026b
commit
fe2bc079bc
2 changed files with 8 additions and 6 deletions
|
@ -12,8 +12,9 @@ use url::Url;
|
|||
use distribution_filename::WheelFilename;
|
||||
use distribution_types::{
|
||||
BuiltDist, DirectUrlBuiltDist, DirectUrlSourceDist, DirectorySourceDist, Dist, FileLocation,
|
||||
GitSourceDist, IndexUrl, ParsedArchiveUrl, PathBuiltDist, PathSourceDist, RegistryBuiltDist,
|
||||
RegistryBuiltWheel, RegistrySourceDist, Resolution, ResolvedDist, ToUrlError,
|
||||
GitSourceDist, IndexUrl, ParsedArchiveUrl, ParsedGitUrl, PathBuiltDist, PathSourceDist,
|
||||
RegistryBuiltDist, RegistryBuiltWheel, RegistrySourceDist, Resolution, ResolvedDist,
|
||||
ToUrlError,
|
||||
};
|
||||
use pep440_rs::Version;
|
||||
use pep508_rs::{MarkerEnvironment, VerbatimUrl};
|
||||
|
@ -310,9 +311,10 @@ impl Distribution {
|
|||
.with_precise(git.precise);
|
||||
|
||||
// Reconstruct the PEP 508-compatible URL from the `GitSource`.
|
||||
// TODO(charlie): This shouldn't be necessary; it's only necessary because we're
|
||||
// still losing the `GitUrl` somewhere along the path to installation.
|
||||
let url = Url::from(git_url.clone());
|
||||
let url = Url::from(ParsedGitUrl {
|
||||
url: git_url.clone(),
|
||||
subdirectory: git.subdirectory.as_ref().map(PathBuf::from),
|
||||
});
|
||||
|
||||
let git_dist = GitSourceDist {
|
||||
name: self.id.name.clone(),
|
||||
|
|
|
@ -300,7 +300,7 @@ fn lock_git() -> Result<()> {
|
|||
----- stderr -----
|
||||
Downloaded 4 packages in [TIME]
|
||||
Installed 5 packages in [TIME]
|
||||
+ anyio==3.7.0 (from https://github.com/agronholm/anyio@f7a880ffac4766efb39e6fb60fc28d944f5d2f65)
|
||||
+ anyio==3.7.0 (from git+https://github.com/agronholm/anyio@f7a880ffac4766efb39e6fb60fc28d944f5d2f65)
|
||||
+ exceptiongroup==1.2.0
|
||||
+ idna==3.6
|
||||
+ sniffio==1.3.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue