Skip to content

Commit 6940c5e

Browse files
jlaineWyattBlue
authored andcommitted
Provide binary wheels for musl-based Linux distros such as Alpine
1 parent bc9ae5b commit 6940c5e

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,14 @@ jobs:
5757
- name: Build wheels
5858
env:
5959
CIBW_ARCHS: ${{ matrix.arch }}
60-
CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb
6160
CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.1.json /tmp/vendor
6261
CIBW_BEFORE_BUILD_MACOS: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-7.1.json /tmp/vendor
6362
CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-7.1.json C:\cibw\vendor
6463
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig
6564
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names
6665
CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename
6766
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel}
68-
CIBW_SKIP: "pp* *-musllinux*"
67+
CIBW_SKIP: "pp*"
6968
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av
7069
CIBW_TEST_REQUIRES: pytest numpy
7170
# skip tests when there are no binary wheels of numpy

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ We are operating with `semantic versioning <https://semver.org>`_.
2020
v14.2.1
2121
-------
2222

23+
Features:
24+
25+
- Provide binary wheels for musl-based distros such as Alpine by :gh-user:`jlaine` in (:pr:`1856`).
26+
2327
Fixes:
2428

2529
- Uses ffmpeg 7.1.1, fixes deadlocks.

scripts/fetch-vendor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ def get_platform():
1111
system = platform.system()
1212
machine = platform.machine()
1313
if system == "Linux":
14-
return f"manylinux_{machine}"
14+
if platform.libc_ver()[0] == "glibc":
15+
return f"manylinux_{machine}"
16+
else:
17+
return f"musllinux_{machine}"
1518
elif system == "Darwin":
1619
# cibuildwheel sets ARCHFLAGS:
1720
# https://github.com/pypa/cibuildwheel/blob/5255155bc57eb6224354356df648dc42e31a0028/cibuildwheel/macos.py#L207-L220

scripts/ffmpeg-7.1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/7.1.1-1/ffmpeg-{platform}.tar.gz"
2+
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/7.1.1-2/ffmpeg-{platform}.tar.gz"
33
}

0 commit comments

Comments
 (0)