Skip to content

Commit e56e01c

Browse files
authored
Merge branch 'main' into arrow
2 parents 1678641 + 7d50816 commit e56e01c

173 files changed

Lines changed: 4914 additions & 822 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ fi
2020
set -e
2121

2222
if [[ $(uname) != CYGWIN* ]]; then
23-
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
23+
sudo apt-get -qq install libfreetype6-dev liblcms2-dev libtiff-dev python3-tk\
2424
ghostscript libjpeg-turbo8-dev libopenjp2-7-dev\
2525
cmake meson imagemagick libharfbuzz-dev libfribidi-dev\
26-
sway wl-clipboard libopenblas-dev
26+
sway wl-clipboard libopenblas-dev nasm
2727
fi
2828

2929
python3 -m pip install --upgrade pip
@@ -65,6 +65,9 @@ if [[ $(uname) != CYGWIN* ]]; then
6565
# raqm
6666
pushd depends && ./install_raqm.sh && popd
6767

68+
# libavif
69+
pushd depends && CMAKE_POLICY_VERSION_MINIMUM=3.5 ./install_libavif.sh && popd
70+
6871
# extra test images
6972
pushd depends && ./install_extra_test_images.sh && popd
7073
else

.ci/requirements-cibw.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cibuildwheel==2.22.0
1+
cibuildwheel==2.23.2

.ci/requirements-mypy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mypy==1.14.1
1+
mypy==1.15.0
22
IceSpringPySideStubs-PyQt6
33
IceSpringPySideStubs-PySide6
44
ipython

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
}
1717
],
1818
"schedule": [
19-
"on the 3rd day of the month"
19+
"* * 3 * *"
2020
]
2121
}

.github/workflows/macos-install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ if [[ "$ImageOS" == "macos13" ]]; then
66
brew uninstall gradle maven
77
fi
88
brew install \
9+
aom \
10+
dav1d \
911
freetype \
1012
ghostscript \
1113
jpeg-turbo \
@@ -14,6 +16,8 @@ brew install \
1416
libtiff \
1517
little-cms2 \
1618
openjpeg \
19+
rav1e \
20+
svt-av1 \
1721
webp
1822
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
1923

@@ -30,5 +34,8 @@ python3 -m pip install numpy
3034
# fails on beta 3.14 and PyPy
3135
python3 -m pip install --only-binary=:all: pyarrow || true
3236

37+
# libavif
38+
pushd depends && ./install_libavif.sh && popd
39+
3340
# extra test images
3441
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/test-docker.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
matrix:
3636
os: ["ubuntu-latest"]
3737
docker: [
38+
# Run slower jobs first to give them a headstart and reduce waiting time
39+
ubuntu-24.04-noble-ppc64le,
40+
ubuntu-24.04-noble-s390x,
41+
# Then run the remainder
3842
alpine,
3943
amazon-2-amd64,
4044
amazon-2023-amd64,
@@ -52,13 +56,9 @@ jobs:
5256
dockerTag: [main]
5357
include:
5458
- docker: "ubuntu-24.04-noble-ppc64le"
55-
os: "ubuntu-22.04"
5659
qemu-arch: "ppc64le"
57-
dockerTag: main
5860
- docker: "ubuntu-24.04-noble-s390x"
59-
os: "ubuntu-22.04"
6061
qemu-arch: "s390x"
61-
dockerTag: main
6262
- docker: "ubuntu-24.04-noble-arm64v8"
6363
os: "ubuntu-24.04-arm"
6464
dockerTag: main
@@ -75,8 +75,9 @@ jobs:
7575

7676
- name: Set up QEMU
7777
if: "matrix.qemu-arch"
78-
run: |
79-
docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }}
78+
uses: docker/setup-qemu-action@v3
79+
with:
80+
platforms: ${{ matrix.qemu-arch }}
8081

8182
- name: Docker pull
8283
run: |

.github/workflows/test-mingw.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
mingw-w64-x86_64-gcc \
6161
mingw-w64-x86_64-ghostscript \
6262
mingw-w64-x86_64-lcms2 \
63+
mingw-w64-x86_64-libavif \
64+
mingw-w64-x86_64-libimagequant \
6365
mingw-w64-x86_64-libjpeg-turbo \
6466
mingw-w64-x86_64-libraqm \
6567
mingw-w64-x86_64-libtiff \

.github/workflows/test-windows.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ jobs:
4141
include:
4242
# Test the oldest Python on 32-bit
4343
- { python-version: "3.9", architecture: "x86", os: "windows-2019" }
44-
timeout-minutes: 30
44+
45+
timeout-minutes: 45
4546

4647
name: Python ${{ matrix.python-version }} (${{ matrix.architecture }})
4748

@@ -97,8 +98,8 @@ jobs:
9798
choco install nasm --no-progress
9899
echo "C:\Program Files\NASM" >> $env:GITHUB_PATH
99100
100-
choco install ghostscript --version=10.4.0 --no-progress
101-
echo "C:\Program Files\gs\gs10.04.0\bin" >> $env:GITHUB_PATH
101+
choco install ghostscript --version=10.5.0 --no-progress
102+
echo "C:\Program Files\gs\gs10.05.0\bin" >> $env:GITHUB_PATH
102103
103104
# Install extra test images
104105
xcopy /S /Y Tests\test-images\* Tests\images
@@ -148,6 +149,10 @@ jobs:
148149
if: steps.build-cache.outputs.cache-hit != 'true'
149150
run: "& winbuild\\build\\build_dep_libpng.cmd"
150151

152+
- name: Build dependencies / libavif
153+
if: steps.build-cache.outputs.cache-hit != 'true' && matrix.architecture == 'x64'
154+
run: "& winbuild\\build\\build_dep_libavif.cmd"
155+
151156
# for FreeType WOFF2 font support
152157
- name: Build dependencies / brotli
153158
if: steps.build-cache.outputs.cache-hit != 'true'

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
persist-credentials: false
7171

7272
- name: Set up Python ${{ matrix.python-version }}
73-
uses: Quansight-Labs/setup-python@v5
73+
uses: actions/setup-python@v5
7474
with:
7575
python-version: ${{ matrix.python-version }}
7676
allow-prereleases: true

.github/workflows/wheels-dependencies.sh

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ else
2525
MB_ML_LIBC=${AUDITWHEEL_POLICY::9}
2626
MB_ML_VER=${AUDITWHEEL_POLICY:9}
2727
fi
28-
PLAT=$CIBW_ARCHS
28+
PLAT="${CIBW_ARCHS:-$AUDITWHEEL_ARCH}"
2929

3030
# Define custom utilities
3131
source wheels/multibuild/common_utils.sh
@@ -38,18 +38,34 @@ ARCHIVE_SDIR=pillow-depends-main
3838

3939
# Package versions for fresh source builds
4040
FREETYPE_VERSION=2.13.3
41-
HARFBUZZ_VERSION=10.2.0
42-
LIBPNG_VERSION=1.6.46
41+
HARFBUZZ_VERSION=11.0.0
42+
LIBPNG_VERSION=1.6.47
4343
JPEGTURBO_VERSION=3.1.0
4444
OPENJPEG_VERSION=2.5.3
45-
XZ_VERSION=5.6.4
46-
TIFF_VERSION=4.6.0
47-
LCMS2_VERSION=2.16
45+
XZ_VERSION=5.8.0
46+
TIFF_VERSION=4.7.0
47+
LCMS2_VERSION=2.17
48+
ZLIB_VERSION=1.3.1
4849
ZLIB_NG_VERSION=2.2.4
4950
LIBWEBP_VERSION=1.5.0
5051
BZIP2_VERSION=1.0.8
5152
LIBXCB_VERSION=1.17.0
5253
BROTLI_VERSION=1.1.0
54+
LIBAVIF_VERSION=1.2.1
55+
56+
if [[ $MB_ML_VER == 2014 ]]; then
57+
function build_xz {
58+
if [ -e xz-stamp ]; then return; fi
59+
yum install -y gettext-devel
60+
fetch_unpack https://tukaani.org/xz/xz-$XZ_VERSION.tar.gz
61+
(cd xz-$XZ_VERSION \
62+
&& ./autogen.sh --no-po4a \
63+
&& ./configure --prefix=$BUILD_PREFIX \
64+
&& make -j4 \
65+
&& make install)
66+
touch xz-stamp
67+
}
68+
fi
5369

5470
function build_pkg_config {
5571
if [ -e pkg-config-stamp ]; then return; fi
@@ -101,12 +117,55 @@ function build_harfbuzz {
101117
touch harfbuzz-stamp
102118
}
103119

120+
function build_libavif {
121+
if [ -e libavif-stamp ]; then return; fi
122+
123+
python3 -m pip install meson ninja
124+
125+
if [[ "$PLAT" == "x86_64" ]] || [ -n "$SANITIZER" ]; then
126+
build_simple nasm 2.16.03 https://www.nasm.us/pub/nasm/releasebuilds/2.16.03
127+
fi
128+
129+
# For rav1e
130+
curl https://sh.rustup.rs -sSf | sh -s -- -y
131+
. "$HOME/.cargo/env"
132+
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
133+
yum install -y perl
134+
if [[ "$MB_ML_VER" == 2014 ]]; then
135+
yum install -y perl-IPC-Cmd
136+
fi
137+
fi
138+
139+
local out_dir=$(fetch_unpack https://github.com/AOMediaCodec/libavif/archive/refs/tags/v$LIBAVIF_VERSION.tar.gz libavif-$LIBAVIF_VERSION.tar.gz)
140+
(cd $out_dir \
141+
&& CMAKE_POLICY_VERSION_MINIMUM=3.5 cmake \
142+
-DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX \
143+
-DCMAKE_INSTALL_LIBDIR=$BUILD_PREFIX/lib \
144+
-DCMAKE_BUILD_TYPE=Release \
145+
-DBUILD_SHARED_LIBS=OFF \
146+
-DAVIF_LIBSHARPYUV=LOCAL \
147+
-DAVIF_LIBYUV=LOCAL \
148+
-DAVIF_CODEC_AOM=LOCAL \
149+
-DAVIF_CODEC_DAV1D=LOCAL \
150+
-DAVIF_CODEC_RAV1E=LOCAL \
151+
-DAVIF_CODEC_SVT=LOCAL \
152+
-DENABLE_NASM=ON \
153+
-DCMAKE_MODULE_PATH=/tmp/cmake/Modules \
154+
. \
155+
&& make install)
156+
touch libavif-stamp
157+
}
158+
104159
function build {
105160
build_xz
106161
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
107162
yum remove -y zlib-devel
108163
fi
109-
build_zlib_ng
164+
if [[ -n "$IS_MACOS" ]] && [[ "$MACOSX_DEPLOYMENT_TARGET" == "10.10" || "$MACOSX_DEPLOYMENT_TARGET" == "10.13" ]]; then
165+
build_new_zlib
166+
else
167+
build_zlib_ng
168+
fi
110169

111170
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
112171
if [ -n "$IS_MACOS" ]; then
@@ -131,6 +190,7 @@ function build {
131190
build_tiff
132191
fi
133192

193+
build_libavif
134194
build_libpng
135195
build_lcms2
136196
build_openjpeg

0 commit comments

Comments
 (0)