Skip to content

Commit 09e4df1

Browse files
committed
Merge branch 'main' into progress
2 parents 24b9ca7 + 4402797 commit 09e4df1

148 files changed

Lines changed: 4665 additions & 787 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: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if [[ $(uname) != CYGWIN* ]]; then
2323
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
@@ -36,6 +36,9 @@ python3 -m pip install -U pytest
3636
python3 -m pip install -U pytest-cov
3737
python3 -m pip install -U pytest-timeout
3838
python3 -m pip install pyroma
39+
# optional test dependency, only install if there's a binary package.
40+
# fails on beta 3.14 and PyPy
41+
python3 -m pip install --only-binary=:all: pyarrow || true
3942

4043
if [[ $(uname) != CYGWIN* ]]; then
4144
python3 -m pip install numpy
@@ -50,7 +53,7 @@ if [[ $(uname) != CYGWIN* ]]; then
5053
# Pyroma uses non-isolated build and fails with old setuptools
5154
if [[ $GHA_PYTHON_VERSION == 3.9 ]]; then
5255
# To match pyproject.toml
53-
python3 -m pip install "setuptools>=67.8"
56+
python3 -m pip install "setuptools>=77"
5457
fi
5558

5659
# webp
@@ -62,6 +65,9 @@ if [[ $(uname) != CYGWIN* ]]; then
6265
# raqm
6366
pushd depends && ./install_raqm.sh && popd
6467

68+
# libavif
69+
pushd depends && CMAKE_POLICY_VERSION_MINIMUM=3.5 ./install_libavif.sh && popd
70+
6571
# extra test images
6672
pushd depends && ./install_extra_test_images.sh && popd
6773
else

.ci/requirements-cibw.txt

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

.clang-format

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# A clang-format style that approximates Python's PEP 7
22
# Useful for IDE integration
3+
Language: C
34
BasedOnStyle: Google
45
AlwaysBreakAfterReturnType: All
56
AllowShortIfStatementsOnASingleLine: false
@@ -11,7 +12,26 @@ ColumnLimit: 88
1112
DerivePointerAlignment: false
1213
IndentGotoLabels: false
1314
IndentWidth: 4
15+
PointerAlignment: Right
16+
ReflowComments: true
17+
SortIncludes: false
18+
SpaceBeforeParens: ControlStatements
19+
SpacesInParentheses: false
20+
TabWidth: 4
21+
UseTab: Never
22+
---
1423
Language: Cpp
24+
BasedOnStyle: Google
25+
AlwaysBreakAfterReturnType: All
26+
AllowShortIfStatementsOnASingleLine: false
27+
AlignAfterOpenBracket: BlockIndent
28+
BinPackArguments: false
29+
BinPackParameters: false
30+
BreakBeforeBraces: Attach
31+
ColumnLimit: 88
32+
DerivePointerAlignment: false
33+
IndentGotoLabels: false
34+
IndentWidth: 4
1535
PointerAlignment: Right
1636
ReflowComments: true
1737
SortIncludes: false

.github/workflows/macos-install.sh

Lines changed: 10 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

@@ -26,6 +30,12 @@ python3 -m pip install -U pytest-cov
2630
python3 -m pip install -U pytest-timeout
2731
python3 -m pip install pyroma
2832
python3 -m pip install numpy
33+
# optional test dependency, only install if there's a binary package.
34+
# fails on beta 3.14 and PyPy
35+
python3 -m pip install --only-binary=:all: pyarrow || true
36+
37+
# libavif
38+
pushd depends && ./install_libavif.sh && popd
2939

3040
# extra test images
3141
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/test-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
centos-stream-10-amd64,
4848
debian-12-bookworm-x86,
4949
debian-12-bookworm-amd64,
50-
fedora-40-amd64,
5150
fedora-41-amd64,
51+
fedora-42-amd64,
5252
gentoo,
5353
ubuntu-22.04-jammy-amd64,
5454
ubuntu-24.04-noble-amd64,

.github/workflows/test-mingw.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ 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 \
6364
mingw-w64-x86_64-libimagequant \
6465
mingw-w64-x86_64-libjpeg-turbo \
6566
mingw-w64-x86_64-libraqm \

.github/workflows/test-windows.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
# Test the oldest Python on 32-bit
4343
- { python-version: "3.9", architecture: "x86", os: "windows-2019" }
4444

45-
timeout-minutes: 30
45+
timeout-minutes: 45
4646

4747
name: Python ${{ matrix.python-version }} (${{ matrix.architecture }})
4848

@@ -88,6 +88,10 @@ jobs:
8888
run: |
8989
python3 -m pip install PyQt6
9090
91+
- name: Install PyArrow dependency
92+
run: |
93+
python3 -m pip install --only-binary=:all: pyarrow || true
94+
9195
- name: Install dependencies
9296
id: install
9397
run: |
@@ -145,6 +149,10 @@ jobs:
145149
if: steps.build-cache.outputs.cache-hit != 'true'
146150
run: "& winbuild\\build\\build_dep_libpng.cmd"
147151

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+
148156
# for FreeType WOFF2 font support
149157
- name: Build dependencies / brotli
150158
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: 11 additions & 10 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,13 +38,14 @@ ARCHIVE_SDIR=pillow-depends-main
3838

3939
# Package versions for fresh source builds
4040
FREETYPE_VERSION=2.13.3
41-
HARFBUZZ_VERSION=10.4.0
41+
HARFBUZZ_VERSION=11.1.0
4242
LIBPNG_VERSION=1.6.47
4343
JPEGTURBO_VERSION=3.1.0
4444
OPENJPEG_VERSION=2.5.3
45-
XZ_VERSION=5.6.4
45+
XZ_VERSION=5.8.1
4646
TIFF_VERSION=4.7.0
4747
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
@@ -64,11 +65,7 @@ function build_pkg_config {
6465

6566
function build_zlib_ng {
6667
if [ -e zlib-stamp ]; then return; fi
67-
fetch_unpack https://github.com/zlib-ng/zlib-ng/archive/$ZLIB_NG_VERSION.tar.gz zlib-ng-$ZLIB_NG_VERSION.tar.gz
68-
(cd zlib-ng-$ZLIB_NG_VERSION \
69-
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
70-
&& make -j4 \
71-
&& make install)
68+
build_github zlib-ng/zlib-ng $ZLIB_NG_VERSION --zlib-compat
7269

7370
if [ -n "$IS_MACOS" ]; then
7471
# Ensure that on macOS, the library name is an absolute path, not an
@@ -95,7 +92,7 @@ function build_harfbuzz {
9592

9693
local out_dir=$(fetch_unpack https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION/harfbuzz-$HARFBUZZ_VERSION.tar.xz harfbuzz-$HARFBUZZ_VERSION.tar.xz)
9794
(cd $out_dir \
98-
&& meson setup build --prefix=$BUILD_PREFIX --libdir=$BUILD_PREFIX/lib --buildtype=release -Dfreetype=enabled -Dglib=disabled)
95+
&& meson setup build --prefix=$BUILD_PREFIX --libdir=$BUILD_PREFIX/lib --buildtype=minsize -Dfreetype=enabled -Dglib=disabled -Dtests=disabled)
9996
(cd $out_dir/build \
10097
&& meson install)
10198
touch harfbuzz-stamp
@@ -106,7 +103,11 @@ function build {
106103
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
107104
yum remove -y zlib-devel
108105
fi
109-
build_zlib_ng
106+
if [[ -n "$IS_MACOS" ]] && [[ "$MACOSX_DEPLOYMENT_TARGET" == "10.10" || "$MACOSX_DEPLOYMENT_TARGET" == "10.13" ]]; then
107+
build_new_zlib
108+
else
109+
build_zlib_ng
110+
fi
110111

111112
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
112113
if [ -n "$IS_MACOS" ]; then

.github/workflows/wheels.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,17 @@ jobs:
121121
windows:
122122
if: github.event_name != 'schedule' || github.repository_owner == 'python-pillow'
123123
name: Windows ${{ matrix.cibw_arch }}
124-
runs-on: windows-latest
124+
runs-on: ${{ matrix.os }}
125125
strategy:
126126
fail-fast: false
127127
matrix:
128128
include:
129129
- cibw_arch: x86
130+
os: windows-latest
130131
- cibw_arch: AMD64
132+
os: windows-latest
131133
- cibw_arch: ARM64
134+
os: windows-11-arm
132135
steps:
133136
- uses: actions/checkout@v4
134137
with:
@@ -157,7 +160,7 @@ jobs:
157160
# Install extra test images
158161
xcopy /S /Y Tests\test-images\* Tests\images
159162
160-
& python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.cibw_arch }}
163+
& python.exe winbuild\build_prepare.py -v --no-imagequant --no-avif --architecture=${{ matrix.cibw_arch }}
161164
shell: pwsh
162165

163166
- name: Build wheels
@@ -240,7 +243,7 @@ jobs:
240243
path: dist
241244
merge-multiple: true
242245
- name: Upload wheels to scientific-python-nightly-wheels
243-
uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # 0.6.1
246+
uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2
244247
with:
245248
artifacts_path: dist
246249
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}

0 commit comments

Comments
 (0)