1717import zipfile
1818
1919from pathlib import Path
20+ from typing import List
2021from typing import Set
2122from typing import Tuple
2223from typing import Union
2627from _helper_functions import print_color
2728
2829
29- def _dedupe_wheel_paths (wheels_dir : Path ) -> list [Path ]:
30+ def _dedupe_wheel_paths (wheels_dir : Path ) -> List [Path ]:
3031 """Collect *.whl under wheels_dir once per inode (rglob can list the same file twice via symlinks)."""
31- wheels : list [Path ] = []
32+ wheels : List [Path ] = []
3233 seen : Set [Tuple [int , int ]] = set ()
3334 for p in sorted (wheels_dir .rglob ("*.whl" )):
3435 try :
@@ -287,6 +288,12 @@ def main() -> None:
287288 # manylinux wheel can't find its libraries
288289 # it means it was already properly repaired
289290 or ("manylinux" in wheel .name and "could not be located" in error_msg )
291+ # ARMv7 CI runs under QEMU; auditwheel may fail libc detection on abi3/native .so
292+ or (
293+ current_platform == "Linux"
294+ and current_arch == "armv7l"
295+ and ("InvalidLibc" in error_msg or "couldn't detect libc" in error_msg )
296+ )
290297 )
291298
292299 has_error = (
@@ -308,6 +315,15 @@ def main() -> None:
308315 print_color (" -> Keeping original wheel (build issue: needs older toolchain)" , Fore .YELLOW )
309316 elif "manylinux" in wheel .name and "could not be located" in error_msg :
310317 print_color (" -> Keeping original wheel (already bundled from PyPI)" , Fore .GREEN )
318+ elif (
319+ current_platform == "Linux"
320+ and current_arch == "armv7l"
321+ and ("InvalidLibc" in error_msg or "couldn't detect libc" in error_msg )
322+ ):
323+ print_color (
324+ " -> Keeping original wheel (auditwheel libc detection failed on ARMv7 runner; often QEMU)" ,
325+ Fore .YELLOW ,
326+ )
311327 skipped_count += 1
312328 elif has_error :
313329 # Actual error occurred (even if a wheel was created, it may be broken)
0 commit comments