mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
fix: improve dependency filtering to be less aggressive
- Change from excluding packages with ANY Windows wheels to only excluding packages that have ONLY Windows wheels AND no source distribution - Use .all() instead of .any() to check if ALL wheels are Windows-specific - Include packages with source distributions even if they have Windows wheels - Fixes missing dependencies like py-spy, aiohttp-cors, colorful, etc. This ensures packages with cross-platform source distributions are included even if they also have platform-specific wheels. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a1ccbb7605
commit
c21f999dda
1 changed files with 18 additions and 12 deletions
|
@ -227,18 +227,24 @@ impl PexLock {
|
||||||
.iter()
|
.iter()
|
||||||
.find(|pkg| pkg.id.name == dep.package_id.name)
|
.find(|pkg| pkg.id.name == dep.package_id.name)
|
||||||
{
|
{
|
||||||
// Check if the dependency has any non-Windows artifacts
|
// Only exclude dependencies that are TRULY Windows-only:
|
||||||
let has_compatible_artifacts = dep_package.wheels.iter().any(|wheel| {
|
// - Have ONLY Windows wheels AND no source distribution
|
||||||
!wheel.filename.platform_tags().iter().any(|tag| {
|
let only_windows_wheels = !dep_package.wheels.is_empty() &&
|
||||||
matches!(
|
dep_package.wheels.iter().all(|wheel| {
|
||||||
tag,
|
wheel.filename.platform_tags().iter().any(|tag| {
|
||||||
PlatformTag::Win32
|
matches!(
|
||||||
| PlatformTag::WinAmd64
|
tag,
|
||||||
| PlatformTag::WinArm64
|
PlatformTag::Win32
|
||||||
| PlatformTag::WinIa64
|
| PlatformTag::WinAmd64
|
||||||
)
|
| PlatformTag::WinArm64
|
||||||
})
|
| PlatformTag::WinIa64
|
||||||
}) || dep_package.sdist.is_some();
|
)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
let has_sdist = dep_package.sdist.is_some();
|
||||||
|
|
||||||
|
// Include unless it's Windows-only (only Windows wheels and no sdist)
|
||||||
|
let has_compatible_artifacts = !only_windows_wheels || has_sdist;
|
||||||
|
|
||||||
// Only include dependencies that have compatible artifacts
|
// Only include dependencies that have compatible artifacts
|
||||||
if has_compatible_artifacts {
|
if has_compatible_artifacts {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue