Fix #128838: Extension: Support _universal2 suffix for Mac

Some python wheels can have `_universal2` suffixes which are built for
both intel and arm architectures. This fix takes care of that.
This commit is contained in:
YimingWu
2024-10-10 19:13:23 +08:00
committed by Philipp Oeser
parent 6d54803f30
commit 382fb5e971
@@ -951,7 +951,8 @@ def _extensions_wheel_filter_for_platform(wheels):
# FIXME: `macosx_11.00` should be `macosx_11_0`.
platform_tag.startswith("macosx_") and
# Ignore the MACOSX version, ensure `arm64` suffix.
platform_tag.endswith("_" + platform_tag_current.rpartition("_")[2])
(platform_tag.endswith("_" + platform_tag_current.rpartition("_")[2]) or
platform_tag.endswith("_universal2"))
):
pass
elif platform_tag_current.startswith("linux_") and (