Skip to content

Commit d52c2db

Browse files
authored
Do not include libavif in wheels
2 parents 0490948 + 07d7800 commit d52c2db

File tree

9 files changed

+2
-570
lines changed

9 files changed

+2
-570
lines changed

.github/workflows/wheels-dependencies.sh

-41
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ LIBWEBP_VERSION=1.5.0
5151
BZIP2_VERSION=1.0.8
5252
LIBXCB_VERSION=1.17.0
5353
BROTLI_VERSION=1.1.0
54-
LIBAVIF_VERSION=1.2.1
5554

5655
function build_pkg_config {
5756
if [ -e pkg-config-stamp ]; then return; fi
@@ -99,45 +98,6 @@ function build_harfbuzz {
9998
touch harfbuzz-stamp
10099
}
101100

102-
function build_libavif {
103-
if [ -e libavif-stamp ]; then return; fi
104-
105-
python3 -m pip install meson ninja
106-
107-
if [[ "$PLAT" == "x86_64" ]] || [ -n "$SANITIZER" ]; then
108-
build_simple nasm 2.16.03 https://www.nasm.us/pub/nasm/releasebuilds/2.16.03
109-
fi
110-
111-
# For rav1e
112-
curl https://sh.rustup.rs -sSf | sh -s -- -y
113-
. "$HOME/.cargo/env"
114-
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
115-
yum install -y perl
116-
if [[ "$MB_ML_VER" == 2014 ]]; then
117-
yum install -y perl-IPC-Cmd
118-
fi
119-
fi
120-
121-
local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz)
122-
(cd $out_dir \
123-
&& CMAKE_POLICY_VERSION_MINIMUM=3.5 cmake \
124-
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
125-
-DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib \
126-
-DCMAKE_BUILD_TYPE=Release \
127-
-DBUILD_SHARED_LIBS=OFF \
128-
-DAVIF_LIBSHARPYUV=LOCAL \
129-
-DAVIF_LIBYUV=LOCAL \
130-
-DAVIF_CODEC_AOM=LOCAL \
131-
-DAVIF_CODEC_DAV1D=LOCAL \
132-
-DAVIF_CODEC_RAV1E=LOCAL \
133-
-DAVIF_CODEC_SVT=LOCAL \
134-
-DENABLE_NASM=ON \
135-
-DCMAKE_MODULE_PATH=/tmp/cmake/Modules \
136-
. \
137-
&& make install)
138-
touch libavif-stamp
139-
}
140-
141101
function build {
142102
build_xz
143103
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
@@ -172,7 +132,6 @@ function build {
172132
build_tiff
173133
fi
174134

175-
build_libavif
176135
build_libpng
177136
build_lcms2
178137
build_openjpeg

.github/workflows/wheels.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,9 @@ jobs:
157157
# Install extra test images
158158
xcopy /S /Y Tests\test-images\* Tests\images
159159
160-
& python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.cibw_arch }}
160+
& python.exe winbuild\build_prepare.py -v --no-imagequant --no-avif --architecture=${{ matrix.cibw_arch }}
161161
shell: pwsh
162162

163-
- name: Update rust
164-
if: matrix.cibw_arch == 'AMD64'
165-
run: |
166-
rustup update
167-
168163
- name: Build wheels
169164
run: |
170165
setlocal EnableDelayedExpansion

Tests/check_wheel.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
import platform
4-
import struct
54
import sys
65

76
from PIL import features
@@ -10,7 +9,7 @@
109

1110

1211
def test_wheel_modules() -> None:
13-
expected_modules = {"pil", "tkinter", "freetype2", "littlecms2", "webp", "avif"}
12+
expected_modules = {"pil", "tkinter", "freetype2", "littlecms2", "webp"}
1413

1514
# tkinter is not available in cibuildwheel installed CPython on Windows
1615
try:
@@ -20,11 +19,6 @@ def test_wheel_modules() -> None:
2019
except ImportError:
2120
expected_modules.remove("tkinter")
2221

23-
# libavif is not available on Windows for x86 and ARM64 architectures
24-
if sys.platform == "win32":
25-
if platform.machine() == "ARM64" or struct.calcsize("P") == 4:
26-
expected_modules.remove("avif")
27-
2822
assert set(features.get_supported_modules()) == expected_modules
2923

3024

wheels/dependency_licenses/AOM.txt

-26
This file was deleted.

wheels/dependency_licenses/DAV1D.txt

-23
This file was deleted.

0 commit comments

Comments
 (0)