Skip to content

Provide binary wheels for musl-based Linux distros such as Alpine #1856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ jobs:
- name: Build wheels
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb
CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.1.json /tmp/vendor
CIBW_BEFORE_BUILD_MACOS: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.1.json /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-7.1.json C:\cibw\vendor
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names
CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel}
CIBW_SKIP: "pp* *-musllinux*"
CIBW_SKIP: "pp*"
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av
CIBW_TEST_REQUIRES: pytest numpy
# skip tests when there are no binary wheels of numpy
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ We are operating with `semantic versioning <https://semver.org>`_.
v14.2.1
-------

Features:

- Provide binary wheels for musl-based distros such as Alpine by :gh-user:`jlaine` in (:pr:`1856`).

Fixes:

- Uses ffmpeg 7.1.1, fixes deadlocks.
Expand Down
5 changes: 4 additions & 1 deletion scripts/fetch-vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def get_platform():
system = platform.system()
machine = platform.machine()
if system == "Linux":
return f"manylinux_{machine}"
if platform.libc_ver()[0] == "glibc":
return f"manylinux_{machine}"
else:
return f"musllinux_{machine}"
elif system == "Darwin":
# cibuildwheel sets ARCHFLAGS:
# https://github.com/pypa/cibuildwheel/blob/5255155bc57eb6224354356df648dc42e31a0028/cibuildwheel/macos.py#L207-L220
Expand Down
2 changes: 1 addition & 1 deletion scripts/ffmpeg-7.1.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/7.1.1-1/ffmpeg-{platform}.tar.gz"
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/7.1.1-2/ffmpeg-{platform}.tar.gz"
}
Loading