From 76e12c2e836f5aea7c12c68201069c38dc4137f2 Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Wed, 28 Aug 2024 23:21:40 +0530 Subject: [PATCH] Fix CasADi libs workaround for macOS wheels --- .github/workflows/publish_pypi.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 7482f03003..a5b412a8a6 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -149,9 +149,6 @@ jobs: - name: Clone pybind11 repo (no history) run: git clone --depth 1 --branch v2.12.0 https://github.com/pybind/pybind11.git -c advice.detachedHead=false - - name: Set macOS-specific environment variables - run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV - - name: Install cibuildwheel run: python -m pip install cibuildwheel @@ -243,16 +240,11 @@ jobs: python scripts/install_KLU_Sundials.py python -m cibuildwheel --output-dir wheelhouse env: + # 10.13 for Intel (macos-12), 11.0 for Apple Silicon (macos-13, macos-14, and macos-latest) + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }} CIBW_ARCHS_MACOS: auto CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools wheel delocate - CIBW_REPAIR_WHEEL_COMMAND: | - if [[ $(uname -m) == "x86_64" ]]; then - delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel} - elif [[ $(uname -m) == "arm64" ]]; then - # Use higher macOS target for now: https://github.com/casadi/casadi/issues/3698 - delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel} --require-target-macos-version 11.1 - for file in {dest_dir}/*.whl; do mv "$file" "${file//macosx_11_1/macosx_11_0}"; done - fi + CIBW_REPAIR_WHEEL_COMMAND: delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel} CIBW_TEST_EXTRAS: "all,dev,jax" CIBW_TEST_COMMAND: | set -e -x