From 460701192045a8b0a648cae8c095125d340eb5e5 Mon Sep 17 00:00:00 2001 From: mario4tier Date: Thu, 26 Nov 2026 20:03:15 -0500 Subject: [PATCH] .github: build macOS wheels at cibuildwheel's default deployment target Drop the MACOSX_DEPLOYMENT_TARGET overrides (13.7 on x86_64, 14.0 on arm64), so cibuildwheel's defaults apply: 11.0 on arm64 and, on x86_64, 10.9 for CPython 3.10 and 3.11, 10.13 for 3.12 and 3.13, 10.15 from 3.14. setup.py already passes the target on to the TA-Lib C build. Add -Werror=unguarded-availability to the macOS builds, so a call to an API newer than the target fails the build. It goes in through CC, which CMake and setuptools both apply to every compile: an environment CFLAGS would replace the interpreter's own compile flags for the extension. Part of #795. --- .github/workflows/wheels.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ff618037c..8db7d0cba 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -174,8 +174,9 @@ jobs: cd .. && pytest -k "not RSI and not threading" {project}/tests CIBW_ARCHS_MACOS: x86_64 + # In CC, not CFLAGS: setuptools replaces Python's own compile flags with an environment CFLAGS. CIBW_ENVIRONMENT_MACOS : > - MACOSX_DEPLOYMENT_TARGET=13.7 + CC="clang -Werror=unguarded-availability" PIP_NO_BUILD_ISOLATION=false - name: Upload wheels uses: actions/upload-artifact@v7 @@ -199,8 +200,9 @@ jobs: python -c "import talib; assert talib._ta_lib._ta_get_runtime_info('vmath.transcendental') == 1, 'TA-Lib C is not using vForce'" && pytest -k "not RSI and not threading" {project}/tests CIBW_ARCHS_MACOS: arm64 + # In CC, not CFLAGS: setuptools replaces Python's own compile flags with an environment CFLAGS. CIBW_ENVIRONMENT_MACOS : > - MACOSX_DEPLOYMENT_TARGET=14.0 + CC="clang -Werror=unguarded-availability" PIP_NO_BUILD_ISOLATION=false - name: Upload wheels uses: actions/upload-artifact@v7