Skip to content

Commit 99c75b3

Browse files
committed
.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.
1 parent afef878 commit 99c75b3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/wheels.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ jobs:
174174
cd .. &&
175175
pytest -k "not RSI and not threading" {project}/tests
176176
CIBW_ARCHS_MACOS: x86_64
177+
# In CC, not CFLAGS: setuptools replaces Python's own compile flags with an environment CFLAGS.
177178
CIBW_ENVIRONMENT_MACOS : >
178-
MACOSX_DEPLOYMENT_TARGET=13.7
179+
CC="clang -Werror=unguarded-availability"
179180
PIP_NO_BUILD_ISOLATION=false
180181
- name: Upload wheels
181182
uses: actions/upload-artifact@v7
@@ -199,8 +200,9 @@ jobs:
199200
python -c "import talib; assert talib._ta_lib._ta_get_runtime_info('vmath.transcendental') == 1, 'TA-Lib C is not using vForce'" &&
200201
pytest -k "not RSI and not threading" {project}/tests
201202
CIBW_ARCHS_MACOS: arm64
203+
# In CC, not CFLAGS: setuptools replaces Python's own compile flags with an environment CFLAGS.
202204
CIBW_ENVIRONMENT_MACOS : >
203-
MACOSX_DEPLOYMENT_TARGET=14.0
205+
CC="clang -Werror=unguarded-availability"
204206
PIP_NO_BUILD_ISOLATION=false
205207
- name: Upload wheels
206208
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)