From cd4c416d4c798db7504e489ed8beb14184357e5b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 1 Aug 2025 12:30:57 +0800 Subject: [PATCH] Disable libavif on x86_64 simulators. --- .github/workflows/wheels-dependencies.sh | 7 ++++++- checks/check_wheel.py | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels-dependencies.sh b/.github/workflows/wheels-dependencies.sh index 2a1082aca..d1b60e3ff 100755 --- a/.github/workflows/wheels-dependencies.sh +++ b/.github/workflows/wheels-dependencies.sh @@ -286,7 +286,12 @@ function build { build_tiff fi - build_libavif + if [[ -z "$IOS_SDK" ]] || [[ "$PLAT" == "arm64" ]]; then + # Building libavif for x86_64 iOS simulator isn't currently possible + # because it requires the use of nasm, which doesn't create + # iOS-compatible binaries. + build_libavif + fi build_libpng build_lcms2 build_openjpeg diff --git a/checks/check_wheel.py b/checks/check_wheel.py index 937722c4b..4e305ceb4 100644 --- a/checks/check_wheel.py +++ b/checks/check_wheel.py @@ -27,6 +27,10 @@ def test_wheel_modules() -> None: # tkinter is not available on iOS expected_modules.remove("tkinter") + # libavif is not available on x86_64 iOS simulators + if platform.machine() == "x86_64": + expected_modules.remove("avif") + assert set(features.get_supported_modules()) == expected_modules