Skip to content

Commit 8467700

Browse files
committed
Set macOS deployment targets for cibuildwheel and update environment variable in pyproject.toml
1 parent fe858a3 commit 8467700

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/build-wheels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ jobs:
2929
# macOS arm64 (macOS 14 Sonoma)
3030
- os: macos-14
3131
cibw_archs: arm64
32+
macos_deployment_target: "14.0"
3233
# macOS arm64 (macOS 15 Sequoia)
3334
- os: macos-15
3435
cibw_archs: arm64
36+
macos_deployment_target: "15.0"
3537

3638
steps:
3739
- name: Checkout repository
@@ -49,6 +51,7 @@ jobs:
4951
run: python -m cibuildwheel --output-dir wheelhouse
5052
env:
5153
CIBW_ARCHS: ${{ matrix.cibw_archs }}
54+
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target }}
5255

5356
- name: List wheels
5457
run: ls -lah wheelhouse/

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ before-build = "bash {project}/.github/scripts/cibw_before_build_macos.sh {proje
9292
repair-wheel-command = "DYLD_LIBRARY_PATH=$HOME/opt/gtdynamics-deps/gtd_current/lib:$HOME/opt/gtdynamics-deps/gtsam_current/lib:$DYLD_LIBRARY_PATH delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
9393

9494
[tool.cibuildwheel.macos.environment]
95-
MACOSX_DEPLOYMENT_TARGET = "$(sw_vers -productVersion | cut -d. -f1).0"
95+
MACOSX_DEPLOYMENT_TARGET = "$MACOSX_DEPLOYMENT_TARGET"
9696
INSTALL_PREFIX = "$HOME/opt/gtdynamics-deps"
9797
GTSAM_DIR = "$HOME/opt/gtdynamics-deps/gtsam_current/lib/cmake/GTSAM"
9898
CMAKE_PREFIX_PATH = "$HOME/opt/gtdynamics-deps/gtsam_current"

0 commit comments

Comments
 (0)