Skip to content

Commit

Permalink
Build macos wheels with maximum backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange committed May 6, 2024
1 parent f7bbb03 commit 2e6104e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ jobs:
env:
CIBW_BUILD_VERBOSITY: 1
# add compiled libmagic to the build directory (to include in the wheel)
CIBW_BEFORE_BUILD: bash "add_libmagic.sh"
CIBW_BEFORE_BUILD: ${{ ( startsWith( matrix.os, 'macos' ) && 'sudo -E 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' }}
# 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

0 comments on commit 2e6104e

Please sign in to comment.