mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-29 03:02:55 +00:00
Respect subdirectories when locating Git workspaces (#5944)
## Summary We were discovering the workspace from the Git repository root, so attempting to build any subdirectories would fail. Closes https://github.com/astral-sh/uv/issues/5942. ## Test Plan ``` cargo run pip install \ git+https://github.com/flyteorg/flytekit.git@master#subdirectory=plugins/flytekit-flyteinteractive ```
This commit is contained in:
parent
fd1d508108
commit
ba7c09edd0
2 changed files with 94 additions and 2 deletions
|
|
@ -1249,11 +1249,17 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> {
|
|||
.await
|
||||
.map_err(Error::CacheWrite)?;
|
||||
|
||||
let path = if let Some(subdirectory) = resource.subdirectory {
|
||||
Cow::Owned(fetch.path().join(subdirectory))
|
||||
} else {
|
||||
Cow::Borrowed(fetch.path())
|
||||
};
|
||||
|
||||
return Ok(ArchiveMetadata::from(
|
||||
Metadata::from_workspace(
|
||||
metadata,
|
||||
fetch.path(),
|
||||
fetch.path(),
|
||||
&path,
|
||||
&path,
|
||||
self.build_context.sources(),
|
||||
self.preview_mode,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue