Skip to content

Commit

Permalink
Bump cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange committed May 28, 2024
1 parent 2822bca commit b1a3338
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install cibuildwheel==2.17.0 # sync version with pypa/cibuildwheel below
- run: pip install cibuildwheel==2.18.1 # sync version with pypa/cibuildwheel below
- id: set-matrix
env:
# only mention one (trivial) python version, as py2.py3 wheels only need to be build once per arch
Expand Down Expand Up @@ -86,14 +86,14 @@ jobs:
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3

- uses: pypa/cibuildwheel@v2.17.0 # sync version with pip install cibuildwheel above
- uses: pypa/cibuildwheel@v2.18.1 # sync version with pip install cibuildwheel above
timeout-minutes: 10
with:
only: ${{ matrix.only }}
env:
CIBW_BUILD_VERBOSITY: 1
# add compiled libmagic to the build directory (to include in the wheel)
CIBW_BEFORE_BUILD: ${{ ( startsWith( matrix.os, 'macos' ) && 'sudo -E bash add_libmagic.sh' ) || 'bash add_libmagic.sh' }}
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' }}
# simple smoke test run on each wheel: this is an HLS MP4 video, only recognised in recent versions of libmagic
Expand Down
8 changes: 8 additions & 0 deletions add_libmagic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ 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 b1a3338

Please sign in to comment.