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,9 +227,11 @@ impl PexLock {
|
|||
.iter()
|
||||
.find(|pkg| pkg.id.name == dep.package_id.name)
|
||||
{
|
||||
// Check if the dependency has any non-Windows artifacts
|
||||
let has_compatible_artifacts = dep_package.wheels.iter().any(|wheel| {
|
||||
!wheel.filename.platform_tags().iter().any(|tag| {
|
||||
// Only exclude dependencies that are TRULY Windows-only:
|
||||
// - Have ONLY Windows wheels AND no source distribution
|
||||
let only_windows_wheels = !dep_package.wheels.is_empty() &&
|
||||
dep_package.wheels.iter().all(|wheel| {
|
||||
wheel.filename.platform_tags().iter().any(|tag| {
|
||||
matches!(
|
||||
tag,
|
||||
PlatformTag::Win32
|
||||
|
@ -238,7 +240,11 @@ impl PexLock {
|
|||
| 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
|
||||
if has_compatible_artifacts {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue