mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
fix: exclude packages without artifacts from PEX lock file
- Add validation to only include packages with at least one artifact - Skip packages that have no downloadable wheels or source distributions - Prevents PEX parser error: "expected to have at least one artifact" This ensures all locked requirements have valid downloadable artifacts as required by the PEX specification. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f0a5b64b33
commit
a884d5e84f
1 changed files with 21 additions and 18 deletions
|
@ -199,6 +199,8 @@ impl PexLock {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(version) = &package.id.version {
|
if let Some(version) = &package.id.version {
|
||||||
|
// Only include packages that have at least one artifact
|
||||||
|
if !artifacts.is_empty() {
|
||||||
// Collect dependencies for this package
|
// Collect dependencies for this package
|
||||||
let mut requires_dists = Vec::new();
|
let mut requires_dists = Vec::new();
|
||||||
for dep in &package.dependencies {
|
for dep in &package.dependencies {
|
||||||
|
@ -221,6 +223,7 @@ impl PexLock {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let locked_resolves = vec![PexLockedResolve {
|
let locked_resolves = vec![PexLockedResolve {
|
||||||
locked_requirements,
|
locked_requirements,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue