Skip to content

Commit 9096240

Browse files
committed
Build on macOS and Linux wheels, except for manylinux2014
1 parent 6ab48ab commit 9096240

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/wheels-dependencies.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ HARFBUZZ_VERSION=12.2.0
102102
LIBPNG_VERSION=1.6.50
103103
JPEGTURBO_VERSION=3.1.2
104104
OPENJPEG_VERSION=2.5.4
105+
JPEGXL_VERSION=0.11.1
105106
XZ_VERSION=5.8.1
106107
ZSTD_VERSION=1.5.7
107108
TIFF_VERSION=4.7.1
@@ -173,6 +174,21 @@ function build_brotli {
173174
touch brotli-stamp
174175
}
175176

177+
function build_jpegxl {
178+
if [ -e jpegxl-stamp ]; then return; fi
179+
180+
local out_dir=$(fetch_unpack https://github.com/google/highway/archive/1.3.0.tar.gz)
181+
(cd $out_dir \
182+
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib $HOST_CMAKE_FLAGS . \
183+
&& make install)
184+
185+
local out_dir=$(fetch_unpack https://github.com/libjxl/libjxl/archive/v$JPEGXL_VERSION.tar.gz)
186+
(cd $out_dir \
187+
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_SKCMS=OFF -DBUILD_TESTING=OFF $HOST_CMAKE_FLAGS . \
188+
&& make install)
189+
touch jpegxl-stamp
190+
}
191+
176192
function build_harfbuzz {
177193
if [ -e harfbuzz-stamp ]; then return; fi
178194
python3 -m pip install meson ninja
@@ -335,6 +351,10 @@ function build {
335351
# On iOS, there's no vendor-provided raqm, and we can't ship it due to
336352
# licensing, so there's no point building harfbuzz.
337353
build_harfbuzz
354+
355+
if [[ "$MB_ML_VER" != 2014 ]]; then
356+
build_jpegxl
357+
fi
338358
fi
339359
}
340360

checks/check_wheel.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import os
34
import platform
45
import sys
56

@@ -25,6 +26,8 @@ def test_wheel_modules() -> None:
2526
elif sys.platform == "ios":
2627
# tkinter is not available on iOS
2728
expected_modules.remove("tkinter")
29+
elif os.environ.get("AUDITWHEEL_POLICY") != "manylinux2014":
30+
expected_modules.add("jpegxl")
2831

2932
assert set(features.get_supported_modules()) == expected_modules
3033

0 commit comments

Comments
 (0)