Skip to content

Commit

Permalink
Give up on 10.9, try 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange committed May 28, 2024
1 parent b1a3338 commit 9834247
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'"

Expand Down
8 changes: 0 additions & 8 deletions add_libmagic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)" &&
Expand Down

0 comments on commit 9834247

Please sign in to comment.