Skip to content

Commit 5051a29

Browse files
committed
Merge branch 'main' into plainPPM
2 parents edc6c3d + c083ead commit 5051a29

File tree

196 files changed

+4586
-4740
lines changed

Some content is hidden

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

196 files changed

+4586
-4740
lines changed

.appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ install:
2525
- mv c:\pillow-depends-main c:\pillow-depends
2626
- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images
2727
- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\
28-
- ..\pillow-depends\gs9550w32.exe /S
29-
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs9.55.0\bin;%PATH%
28+
- ..\pillow-depends\gs9561w32.exe /S
29+
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs9.56.1\bin;%PATH%
3030
- cd c:\pillow\winbuild\
3131
- ps: |
3232
c:\python37\python.exe c:\pillow\winbuild\build_prepare.py -v --depends=C:\pillow-depends\
@@ -43,7 +43,7 @@ build_script:
4343

4444
test_script:
4545
- cd c:\pillow
46-
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov'
46+
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout'
4747
- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE%
4848
- '%PYTHON%\%EXECUTABLE% -c "from PIL import Image"'
4949
- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests'

.ci/after_success.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# gather the coverage data
44
python3 -m pip install codecov
55
if [[ $MATRIX_DOCKER ]]; then
6-
coverage xml --ignore-errors
6+
python3 -m coverage xml --ignore-errors
77
else
8-
coverage xml
8+
python3 -m coverage xml
99
fi

.ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
coverage erase
5+
python3 -m coverage erase
66
if [ $(uname) == "Darwin" ]; then
77
export CPPFLAGS="-I/usr/local/miniconda/include";
88
fi

.ci/install.sh

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ aptget_update()
1313
return 1
1414
fi
1515
}
16-
aptget_update || aptget_update retry || aptget_update retry
16+
if [[ $(uname) != CYGWIN* ]]; then
17+
aptget_update || aptget_update retry || aptget_update retry
18+
fi
1719

1820
set -e
1921

20-
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
21-
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
22-
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
22+
if [[ $(uname) != CYGWIN* ]]; then
23+
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
24+
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
25+
cmake meson imagemagick libharfbuzz-dev libfribidi-dev
26+
fi
2327

2428
python3 -m pip install --upgrade pip
2529
python3 -m pip install --upgrade wheel
@@ -32,24 +36,28 @@ python3 -m pip install -U pytest-cov
3236
python3 -m pip install -U pytest-timeout
3337
python3 -m pip install pyroma
3438
python3 -m pip install test-image-results
35-
python3 -m pip install numpy
36-
37-
# PyQt5 doesn't support PyPy3
38-
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
39-
# arm64, ppc64le, s390x CPUs:
40-
# "ERROR: Could not find a version that satisfies the requirement pyqt5"
41-
sudo apt-get -qq install libxcb-xinerama0 pyqt5-dev-tools
42-
python3 -m pip install pyqt5
43-
fi
4439

45-
# webp
46-
pushd depends && ./install_webp.sh && popd
40+
if [[ $(uname) != CYGWIN* ]]; then
41+
# TODO Remove condition when NumPy supports 3.11
42+
if ! [ "$GHA_PYTHON_VERSION" == "3.11-dev" ]; then python3 -m pip install numpy ; fi
4743

48-
# libimagequant
49-
pushd depends && ./install_imagequant.sh && popd
44+
# PyQt6 doesn't support PyPy3
45+
if [[ $GHA_PYTHON_VERSION == 3.* ]]; then
46+
sudo apt-get -qq install libegl1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxkbcommon-x11-0
47+
python3 -m pip install pyqt6
48+
fi
5049

51-
# raqm
52-
pushd depends && ./install_raqm.sh && popd
50+
# webp
51+
pushd depends && ./install_webp.sh && popd
5352

54-
# extra test images
55-
pushd depends && ./install_extra_test_images.sh && popd
53+
# libimagequant
54+
pushd depends && ./install_imagequant.sh && popd
55+
56+
# raqm
57+
pushd depends && ./install_raqm.sh && popd
58+
59+
# extra test images
60+
pushd depends && ./install_extra_test_images.sh && popd
61+
else
62+
cd depends && ./install_extra_test_images.sh && cd ..
63+
fi

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ trim_trailing_whitespace = true
1616
[*.yml]
1717
# Two-space indentation
1818
indent_size = 2
19-
indent_style = space
2019

2120
# Tab indentation (no size specified)
2221
[Makefile]

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Bug fixes, feature additions, tests, documentation and more can be contributed v
44

55
## Bug fixes, feature additions, etc.
66

7-
Please send a pull request to the `main` branch. Please include [documentation](https://pillow.readthedocs.io) and [tests](../Tests/README.rst) for new features. Tests or documentation without bug fixes or feature additions are welcome too. Feel free to ask questions [via issues](https://github.com/python-pillow/Pillow/issues/new), [Gitter](https://gitter.im/python-pillow/Pillow) or irc://irc.freenode.net#pil
7+
Please send a pull request to the `main` branch. Please include [documentation](https://pillow.readthedocs.io) and [tests](../Tests/README.rst) for new features. Tests or documentation without bug fixes or feature additions are welcome too. Feel free to ask questions [via issues](https://github.com/python-pillow/Pillow/issues/new), [discussions](https://github.com/python-pillow/Pillow/discussions/new), [Gitter](https://gitter.im/python-pillow/Pillow) or irc://irc.freenode.net#pil
88

99
- Fork the Pillow repository.
1010
- Create a branch from `main`.

.github/mergify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pull_request_rules:
88
- status-success=Docker Test Successful
99
- status-success=Windows Test Successful
1010
- status-success=MinGW Test Successful
11+
- status-success=Cygwin Test Successful
1112
- status-success=continuous-integration/appveyor/pr
1213
actions:
1314
merge:

.github/workflows/macos-install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ python3 -m pip install pyroma
1515
python3 -m pip install test-image-results
1616

1717
echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg
18-
python3 -m pip install numpy
18+
# TODO Remove condition when NumPy supports 3.11
19+
if ! [ "$GHA_PYTHON_VERSION" == "3.11-dev" ]; then python3 -m pip install numpy ; fi
1920

2021
# extra test images
2122
pushd depends && ./install_extra_test_images.sh && popd

.github/workflows/stale.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Close stale issues
2+
3+
on:
4+
schedule:
5+
- cron: "10 0 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
issues: write
10+
11+
jobs:
12+
stale:
13+
if: github.repository_owner == 'python-pillow'
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: "Check issues"
19+
uses: actions/stale@v5
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
only-labels: "Awaiting OP Action"
23+
close-issue-message: "Closing this issue as no feedback has been received."
24+
days-before-stale: 7
25+
days-before-issue-close: 0
26+
days-before-pr-close: -1
27+
labels-to-remove-when-unstale: "Awaiting OP Action"

.github/workflows/test-cygwin.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Test Cygwin
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python-minor-version: [7, 8, 9]
12+
13+
timeout-minutes: 40
14+
15+
name: Python 3.${{ matrix.python-minor-version }}
16+
17+
steps:
18+
- name: Fix line endings
19+
run: |
20+
git config --global core.autocrlf input
21+
22+
- name: Checkout Pillow
23+
uses: actions/checkout@v3
24+
25+
- name: Install Cygwin
26+
uses: cygwin/cygwin-install-action@v2
27+
with:
28+
platform: x86_64
29+
packages: >
30+
ImageMagick gcc-g++ ghostscript jpeg libfreetype-devel
31+
libimagequant-devel libjpeg-devel liblapack-devel
32+
liblcms2-devel libopenjp2-devel libraqm-devel
33+
libtiff-devel libwebp-devel libxcb-devel libxcb-xinerama0
34+
make netpbm perl
35+
python3${{ matrix.python-minor-version }}-cffi
36+
python3${{ matrix.python-minor-version }}-cython
37+
python3${{ matrix.python-minor-version }}-devel
38+
python3${{ matrix.python-minor-version }}-numpy
39+
python3${{ matrix.python-minor-version }}-sip
40+
python3${{ matrix.python-minor-version }}-tkinter
41+
qt5-devel-tools subversion xorg-server-extra zlib-devel
42+
43+
- name: Add Lapack to PATH
44+
uses: egor-tensin/cleanup-path@v1
45+
with:
46+
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack'
47+
48+
- name: pip cache
49+
uses: actions/cache@v3
50+
with:
51+
path: 'C:\cygwin\home\runneradmin\.cache\pip'
52+
key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }}
53+
restore-keys: |
54+
${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-
55+
56+
- name: Build system information
57+
run: |
58+
dash.exe -c "python3 .github/workflows/system-info.py"
59+
60+
- name: Install dependencies
61+
run: |
62+
bash.exe .ci/install.sh
63+
64+
- name: Install a different NumPy
65+
shell: dash.exe -l "{0}"
66+
run: |
67+
python3 -m pip install -U 'numpy!=1.21.*'
68+
69+
- name: Build
70+
shell: bash.exe -eo pipefail -o igncr "{0}"
71+
run: |
72+
.ci/build.sh
73+
74+
- name: Test
75+
run: |
76+
bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh
77+
78+
- name: Prepare to upload errors
79+
if: failure()
80+
run: |
81+
dash.exe -c "mkdir -p Tests/errors"
82+
83+
- name: Upload errors
84+
uses: actions/upload-artifact@v3
85+
if: failure()
86+
with:
87+
name: errors
88+
path: Tests/errors
89+
90+
- name: After success
91+
run: |
92+
bash.exe .ci/after_success.sh
93+
94+
- name: Upload coverage
95+
uses: codecov/codecov-action@v3
96+
with:
97+
file: ./coverage.xml
98+
flags: GHA_Cygwin
99+
name: Cygwin Python 3.${{ matrix.python-minor-version }}
100+
101+
success:
102+
needs: build
103+
runs-on: ubuntu-latest
104+
name: Cygwin Test Successful
105+
steps:
106+
- name: Success
107+
run: echo Cygwin Test Successful

0 commit comments

Comments
 (0)