From 9834247daf59a806877e8cf33427de6164600f4f Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Wed, 29 May 2024 01:43:32 +0200 Subject: [PATCH] Give up on 10.9, try 11.0 --- .github/workflows/wheels.yml | 4 ++-- add_libmagic.sh | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 89e0456..ba19ea8 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -59,7 +59,7 @@ jobs: MATRIX_INCLUDE=$( { cibuildwheel --print-build-identifiers --platform linux --arch all | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | jq -nRc '{"only": inputs, "os": "macos-13"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | jq -nRc '{"only": inputs, "os": "macos-12"}' \ && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | jq -nRc '{"only": inputs, "os": "macos-14"}' \ && cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc @@ -95,7 +95,7 @@ jobs: # add compiled libmagic to the build directory (to include in the wheel) CIBW_BEFORE_BUILD: ${{ ( startsWith( matrix.os, 'macos' ) && 'sudo chmod -R 777 /usr/local && bash add_libmagic.sh' ) || 'bash add_libmagic.sh' }} # build macos wheels with maximum backwards compatibility (gcc -mmacosx-version-min flag) - MACOSX_DEPLOYMENT_TARGET: ${{ ( endsWith( matrix.only, 'arm64' ) && '11.0' ) || '10.9' }} + MACOSX_DEPLOYMENT_TARGET: '11.0' # simple smoke test run on each wheel: this is an HLS MP4 video, only recognised in recent versions of libmagic CIBW_TEST_COMMAND: python -c "import magic; assert magic.Magic(mime=True).from_buffer(b'\x00\x00\x00\x1cftypiso5\x00\x00\x00\x01isomiso5hlsf\x00\x00') == 'video/mp4'" diff --git a/add_libmagic.sh b/add_libmagic.sh index 0b25bf3..ba90bdc 100755 --- a/add_libmagic.sh +++ b/add_libmagic.sh @@ -6,14 +6,6 @@ install_source() { # install from source # https://www.darwinsys.com/file/ # https://github.com/file/file/blob/FILE5_45/INSTALL#L51 - if [ -n "$(which brew)" ] && [ "$(uname -m)" == "x86_64" ]; then - # libzstd and liblzma need to be rebuilt from source on intel macos - # so they respect MACOSX_DEPLOYMENT_TARGET=10.9 when they get copied into the wheel - # zstd dependency cmake does not need a (lengthy) build from source, just latest - brew upgrade cmake && - brew pin cmake && - brew reinstall --build-from-source zstd xz - fi ( version="file-5.45" && tmpfile="$(mktemp)" &&