Skip to content

Commit d9076fa

Browse files
committed
Merge branch 'main' into build-editable
2 parents bf9ba35 + ceb0c57 commit d9076fa

119 files changed

Lines changed: 1340 additions & 1051 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.

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ init:
66
# Uncomment previous line to get RDP access during the build.
77

88
environment:
9+
COVERAGE_CORE: sysmon
910
EXECUTABLE: python.exe
1011
TEST_OPTIONS:
1112
DEPLOY: YES

.ci/requirements-mypy.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mypy==1.8.0

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tidelift: "pypi/Pillow"
1+
tidelift: "pypi/pillow"

.github/workflows/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ on:
77
paths:
88
- ".github/workflows/docs.yml"
99
- "docs/**"
10+
- "src/PIL/**"
1011
pull_request:
1112
paths:
1213
- ".github/workflows/docs.yml"
1314
- "docs/**"
15+
- "src/PIL/**"
1416
workflow_dispatch:
1517

1618
permissions:

.github/workflows/test-cygwin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ concurrency:
2626
group: ${{ github.workflow }}-${{ github.ref }}
2727
cancel-in-progress: true
2828

29+
env:
30+
COVERAGE_CORE: sysmon
31+
2932
jobs:
3033
build:
3134
runs-on: windows-latest

.github/workflows/test-mingw.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ concurrency:
2626
group: ${{ github.workflow }}-${{ github.ref }}
2727
cancel-in-progress: true
2828

29+
env:
30+
COVERAGE_CORE: sysmon
31+
2932
jobs:
3033
build:
3134
runs-on: windows-latest
@@ -64,10 +67,10 @@ jobs:
6467
mingw-w64-x86_64-python3-cffi \
6568
mingw-w64-x86_64-python3-numpy \
6669
mingw-w64-x86_64-python3-olefile \
67-
mingw-w64-x86_64-python3-pip \
6870
mingw-w64-x86_64-python3-setuptools \
6971
mingw-w64-x86_64-python-pyqt6
7072
73+
python3 -m ensurepip
7174
python3 -m pip install pyroma pytest pytest-cov pytest-timeout
7275
7376
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/test-windows.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ concurrency:
2626
group: ${{ github.workflow }}-${{ github.ref }}
2727
cancel-in-progress: true
2828

29+
env:
30+
COVERAGE_CORE: sysmon
31+
2932
jobs:
3033
build:
3134
runs-on: windows-latest
3235
strategy:
3336
fail-fast: false
3437
matrix:
35-
python-version: ["pypy3.10", "pypy3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
38+
python-version: ["pypy3.10", "pypy3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha.3"]
3639

3740
timeout-minutes: 30
3841

@@ -66,8 +69,16 @@ jobs:
6669
- name: Print build system information
6770
run: python3 .github/workflows/system-info.py
6871

69-
- name: python3 -m pip install pytest pytest-cov pytest-timeout defusedxml olefile pyroma
70-
run: python3 -m pip install pytest pytest-cov pytest-timeout defusedxml olefile pyroma
72+
- name: Install Python dependencies
73+
run: >
74+
python3 -m pip install
75+
coverage>=7.4.2
76+
defusedxml
77+
olefile
78+
pyroma
79+
pytest
80+
pytest-cov
81+
pytest-timeout
7182
7283
- name: Install dependencies
7384
id: install

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ concurrency:
2727
cancel-in-progress: true
2828

2929
env:
30+
COVERAGE_CORE: sysmon
3031
FORCE_COLOR: 1
3132

3233
jobs:

.github/workflows/wheels-dependencies.sh

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ FREETYPE_VERSION=2.13.2
1919
HARFBUZZ_VERSION=8.3.0
2020
LIBPNG_VERSION=1.6.40
2121
JPEGTURBO_VERSION=3.0.1
22-
OPENJPEG_VERSION=2.5.0
22+
OPENJPEG_VERSION=2.5.2
2323
XZ_VERSION=5.4.5
2424
TIFF_VERSION=4.6.0
2525
LCMS2_VERSION=2.16
@@ -40,7 +40,7 @@ BROTLI_VERSION=1.1.0
4040

4141
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "x86_64" ]]; then
4242
function build_openjpeg {
43-
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz openjpeg-2.5.0.tar.gz)
43+
local out_dir=$(fetch_unpack https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz openjpeg-${OPENJPEG_VERSION}.tar.gz)
4444
(cd $out_dir \
4545
&& cmake -DCMAKE_INSTALL_PREFIX=$BUILD_PREFIX -DCMAKE_INSTALL_NAME_DIR=$BUILD_PREFIX/lib . \
4646
&& make install)
@@ -62,7 +62,7 @@ function build_brotli {
6262

6363
function build {
6464
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "arm64" ]]; then
65-
export BUILD_PREFIX="/usr/local"
65+
sudo chown -R runner /usr/local
6666
fi
6767
build_xz
6868
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
@@ -75,8 +75,8 @@ function build {
7575
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
7676
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
7777
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
78-
if [ -f /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc ]; then
79-
cp /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc /Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig/xcb-proto.pc
78+
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
79+
cp /usr/local/share/pkgconfig/xcb-proto.pc /usr/local/lib/pkgconfig
8080
fi
8181
else
8282
sed s/\${pc_sysrootdir\}// /usr/local/share/pkgconfig/xcb-proto.pc > /usr/local/lib/pkgconfig/xcb-proto.pc
@@ -87,12 +87,10 @@ function build {
8787
build_tiff
8888
build_libpng
8989
build_lcms2
90-
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "arm64" ]]; then
91-
for dylib in libjpeg.dylib libtiff.dylib liblcms2.dylib; do
92-
cp $BUILD_PREFIX/lib/$dylib /opt/arm64-builds/lib
93-
done
94-
fi
9590
build_openjpeg
91+
if [ -f /usr/local/lib64/libopenjp2.so ]; then
92+
cp /usr/local/lib64/libopenjp2.so /usr/local/lib
93+
fi
9694

9795
ORIGINAL_CFLAGS=$CFLAGS
9896
CFLAGS="$CFLAGS -O3 -DNDEBUG"
@@ -128,14 +126,19 @@ curl -fsSL -o pillow-depends-main.zip https://github.com/python-pillow/pillow-de
128126
untar pillow-depends-main.zip
129127

130128
if [[ -n "$IS_MACOS" ]]; then
131-
# webp, libtiff, libxcb cause a conflict with building webp, libtiff, libxcb
129+
# libtiff and libxcb cause a conflict with building libtiff and libxcb
132130
# libxau and libxdmcp cause an issue on macOS < 11
133-
# if php is installed, brew tries to reinstall these after installing openblas
134131
# remove cairo to fix building harfbuzz on arm64
135132
# remove lcms2 and libpng to fix building openjpeg on arm64
136-
# remove zstd to avoid inclusion on x86_64
133+
# remove jpeg-turbo to avoid inclusion on arm64
134+
# remove webp and zstd to avoid inclusion on x86_64
137135
# curl from brew requires zstd, use system curl
138-
brew remove --ignore-dependencies webp libpng libtiff libxcb libxau libxdmcp curl php cairo lcms2 ghostscript zstd
136+
brew remove --ignore-dependencies libpng libtiff libxcb libxau libxdmcp curl cairo lcms2 zstd
137+
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
138+
brew remove --ignore-dependencies jpeg-turbo
139+
else
140+
brew remove --ignore-dependencies webp
141+
fi
139142

140143
brew install pkg-config
141144
fi

.github/workflows/wheels-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -e
44
if [[ "$OSTYPE" == "darwin"* ]]; then
55
brew install fribidi
66
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
7+
if [ -f /opt/homebrew/lib/libfribidi.dylib ]; then
8+
sudo cp /opt/homebrew/lib/libfribidi.dylib /usr/local/lib
9+
fi
710
elif [ "${AUDITWHEEL_POLICY::9}" == "musllinux" ]; then
811
apk add curl fribidi
912
else

0 commit comments

Comments
 (0)