mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Respect direct URLs in puffin installer (#345)
We now write the `direct_url.json` when installing, and _skip_ installing if we find a package installed via the direct URL that the user is requesting. A lot of TODOs, especially around cleaning up the `Source` abstraction and its relationship to `DirectUrl`. I'm gonna keep working on these today, but this works and makes the requirements clear. Closes #332.
This commit is contained in:
parent
55ad1c89be
commit
2c32bc5a86
16 changed files with 464 additions and 44 deletions
|
@ -146,6 +146,11 @@ impl<'a, T: BuildContext> SourceDistributionFetcher<'a, T> {
|
|||
return Ok(None);
|
||||
};
|
||||
|
||||
// If the commit already contains a complete SHA, short-circuit.
|
||||
if git.precise().is_some() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
// Fetch the precise SHA of the Git reference (which could be a branch, a tag, a partial
|
||||
// commit, etc.).
|
||||
let dir = self.0.cache().join(GIT_CACHE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue