diff --git a/pip/flatpak-pip-generator.py b/pip/flatpak-pip-generator.py index 4703fb89..92a8182e 100755 --- a/pip/flatpak-pip-generator.py +++ b/pip/flatpak-pip-generator.py @@ -428,7 +428,12 @@ def collect(compat_fn) -> list[dict]: (f for f in get_pypi_files() if is_universal(f["filename"])), None, ) - if pypi_universal: + + # Only take a universal wheel if there are no platform-specific ones: the + # platform-specific ones likely contain precompiled fast-paths. In that + # case we'll either want the platform-specific wheels or a source build, + # depending on user preference. + if pypi_universal and not any(is_platform_wheel(f["filename"]) for f in get_pypi_files()): return [make_source(pypi_universal)], [] if not is_preferred: