From 74cd3585a0824069b5a15886d208a33735a09517 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 2 Jan 2021 23:26:12 +1100 Subject: [PATCH 1/9] Pillow -> 8.1.0 --- Pillow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pillow b/Pillow index d209b7cab..fcc42e0d3 160000 --- a/Pillow +++ b/Pillow @@ -1 +1 @@ -Subproject commit d209b7cab2866cbf381cbfc193f57de91a403757 +Subproject commit fcc42e0d344146ee9d265d1f43c094ce5a0ec4cf From f7243c7ce8445146777a568ccd6ff3082afb303f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Jan 2021 11:08:32 +0200 Subject: [PATCH 2/9] Remove 'latest' jobs from Travis CI --- .travis.yml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f876ac46..1c465aa2a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,48 +47,6 @@ jobs: - MB_PYTHON_VERSION=3.9 - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - name: "3.6 Xenial aarch64 latest" - os: linux - arch: arm64 - if: tag IS blank - env: - - PLAT=aarch64 - - MB_ML_VER=2014 - - MB_PYTHON_VERSION=3.6 - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - LATEST="true" - - name: "3.7 Xenial aarch64 latest" - os: linux - arch: arm64 - if: tag IS blank - env: - - PLAT=aarch64 - - MB_ML_VER=2014 - - MB_PYTHON_VERSION=3.7 - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - LATEST="true" - - name: "3.8 Xenial aarch64 latest" - os: linux - arch: arm64 - if: tag IS blank - env: - - PLAT=aarch64 - - MB_ML_VER=2014 - - MB_PYTHON_VERSION=3.8 - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - LATEST="true" - - name: "3.9 Xenial aarch64 latest" - os: linux - arch: arm64 - if: tag IS blank - env: - - PLAT=aarch64 - - MB_ML_VER=2014 - - MB_PYTHON_VERSION=3.9 - - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - - LATEST="true" - - before_install: - source multibuild/common_utils.sh - source multibuild/travis_steps.sh From 33cecd6036f7e9e9bf91c5105825dd307345282b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 3 Jan 2021 13:37:43 +0200 Subject: [PATCH 3/9] Remove 'tags: true' to upload wheels for manually triggered builds --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1c465aa2a..78609160a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,5 +72,4 @@ deploy: on: condition: -z "$LATEST" repo: python-pillow/pillow-wheels - tags: true skip_cleanup: true From b380ff3ad2941e60e3149ceb29064c9e1f1685d1 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 10 Jan 2021 22:19:26 +1100 Subject: [PATCH 4/9] Move from multibuild IS_OSX to IS_MACOS --- config.sh | 16 ++++++++-------- multibuild | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config.sh b/config.sh index f7185fc17..5c7d992a9 100644 --- a/config.sh +++ b/config.sh @@ -1,5 +1,5 @@ # Define custom utilities -# Test for OS X with [ -n "$IS_OSX" ] +# Test for macOS with [ -n "$IS_MACOS" ] ARCHIVE_SDIR=pillow-depends-master @@ -22,19 +22,19 @@ function pre_build { # Runs in the root directory of this repository. curl -fsSL -o pillow-depends-master.zip https://github.com/python-pillow/pillow-depends/archive/master.zip untar pillow-depends-master.zip - if [ -n "$IS_OSX" ]; then - # Update to latest zlib for OS X build + if [ -n "$IS_MACOS" ]; then + # Update to latest zlib for macOS build build_new_zlib fi - if [ -n "$IS_OSX" ]; then + if [ -n "$IS_MACOS" ]; then ORIGINAL_BUILD_PREFIX=$BUILD_PREFIX ORIGINAL_PKG_CONFIG_PATH=$PKG_CONFIG_PATH BUILD_PREFIX=`dirname $(dirname $(which python))` PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig" fi build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist - if [ -n "$IS_OSX" ]; then + if [ -n "$IS_MACOS" ]; then build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist @@ -42,7 +42,7 @@ function pre_build { sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc fi build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist - if [ -n "$IS_OSX" ]; then + if [ -n "$IS_MACOS" ]; then BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH fi @@ -62,7 +62,7 @@ function pre_build { build_libwebp CFLAGS=$ORIGINAL_CFLAGS - if [ -n "$IS_OSX" ]; then + if [ -n "$IS_MACOS" ]; then # Custom freetype build build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no --with-brotli=no else @@ -87,7 +87,7 @@ EXP_MODULES="freetype2 littlecms2 pil tkinter webp" EXP_FEATURES="transp_webp webp_anim webp_mux xcb" function run_tests { - if [ -n "$IS_OSX" ]; then + if [ -n "$IS_MACOS" ]; then brew install openblas echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg fi diff --git a/multibuild b/multibuild index 8882150df..a01ddf720 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 8882150df6529658700b66bec124dfb77eefca26 +Subproject commit a01ddf72034b184f1b15341fe8cc7c02ea30bcb9 From faeb4599e51104f7e5501ebc9059fbfe102b08fc Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 30 Jan 2021 10:38:55 +1100 Subject: [PATCH 5/9] Build arm64 wheel --- .github/workflows/build.sh | 8 +++++--- .github/workflows/wheels.yml | 15 ++++++++++++++- config.sh | 33 ++++++++++++++++++++++----------- multibuild | 2 +- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 017bcc3ed..6844b59f2 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -29,6 +29,8 @@ echo "::group::Build wheel" ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/" echo "::endgroup::" -echo "::group::Test wheel" - install_run $PLAT -echo "::endgroup::" +if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then + echo "::group::Test wheel" + install_run $PLAT + echo "::endgroup::" +fi \ No newline at end of file diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4aa28ae35..bad06ff93 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -7,7 +7,6 @@ env: REPO_DIR: Pillow BUILD_DEPENDS: "" TEST_DEPENDS: "pytest pytest-cov" - MACOSX_DEPLOYMENT_TARGET: "10.10" WHEEL_SDIR: wheelhouse jobs: @@ -20,6 +19,7 @@ jobs: os: [ "ubuntu-16.04", "macos-latest" ] python: [ "pypy3.7-7.3.3","pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ] platform: [ "x86_64", "i686" ] + macos-target: [ "10.10" ] exclude: - os: "macos-latest" platform: "i686" @@ -28,11 +28,17 @@ jobs: os-name: "osx" - os: "ubuntu-16.04" os-name: "xenial" + - os: "macos-11.0" + os-name: "osx" + platform: "arm64" + python: "3.9" + macos-target: "11.0" env: BUILD_COMMIT: HEAD PLAT: ${{ matrix.platform }} MB_PYTHON_VERSION: ${{ matrix.python }} TRAVIS_OS_NAME: ${{ matrix.os-name }} + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: - uses: actions/checkout@v2 with: @@ -61,6 +67,7 @@ jobs: os: [ "ubuntu-16.04", "macos-latest" ] python: [ "pypy3.7-7.3.3", "pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ] platform: [ "x86_64", "i686" ] + macos-target: [ "10.10" ] exclude: - os: "macos-latest" platform: "i686" @@ -69,11 +76,17 @@ jobs: os-name: "osx" - os: "ubuntu-16.04" os-name: "xenial" + - os: "macos-11.0" + os-name: "osx" + platform: "arm64" + python: "3.9" + macos-target: "11.0" env: BUILD_COMMIT: master PLAT: ${{ matrix.platform }} MB_PYTHON_VERSION: ${{ matrix.python }} TRAVIS_OS_NAME: ${{ matrix.os-name }} + MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: - uses: actions/checkout@v2 with: diff --git a/config.sh b/config.sh index 5c7d992a9..1e6904ace 100644 --- a/config.sh +++ b/config.sh @@ -33,15 +33,17 @@ function pre_build { BUILD_PREFIX=`dirname $(dirname $(which python))` PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig" fi - build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist - if [ -n "$IS_MACOS" ]; then - build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto - build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib - build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist - else - sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc + if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then + build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist + if [ -n "$IS_MACOS" ]; then + build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto + build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib + build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist + else + sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc + fi + build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist fi - build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist if [ -n "$IS_MACOS" ]; then BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH @@ -56,7 +58,9 @@ function pre_build { build_tiff build_libpng build_lcms2 - build_openjpeg + if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then + build_openjpeg + fi CFLAGS="$CFLAGS -O3 -DNDEBUG" build_libwebp @@ -82,9 +86,16 @@ function run_tests_in_repo { pytest } -EXP_CODECS="jpg jpg_2000 libtiff zlib" +EXP_CODECS="jpg" +if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then + EXP_CODECS="$EXP_CODECS jpg_2000" +fi +EXP_CODECS="$EXP_CODECS libtiff zlib" EXP_MODULES="freetype2 littlecms2 pil tkinter webp" -EXP_FEATURES="transp_webp webp_anim webp_mux xcb" +EXP_FEATURES="transp_webp webp_anim webp_mux" +if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then + EXP_FEATURES="$EXP_FEATURES xcb" +fi function run_tests { if [ -n "$IS_MACOS" ]; then diff --git a/multibuild b/multibuild index a01ddf720..2bf2b360f 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit a01ddf72034b184f1b15341fe8cc7c02ea30bcb9 +Subproject commit 2bf2b360f084aaa4b166935c3bd279e2e842f6ff From 398f2d8af58708715cfb11739658e506f31001d4 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 31 Jan 2021 15:57:24 +1100 Subject: [PATCH 6/9] Limit numpy to 1.19.5 on 32-bit pypy 3.7 --- config.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config.sh b/config.sh index 1e6904ace..e4f188d1a 100644 --- a/config.sh +++ b/config.sh @@ -102,7 +102,11 @@ function run_tests { brew install openblas echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg fi - python3 -m pip install numpy + if [[ "$MB_PYTHON_VERSION" == pypy3.7-* ]] && [[ $(uname -m) == "i686" ]]; then + python3 -m pip install numpy==1.19.5 + else + python3 -m pip install numpy + fi mv ../pillow-depends-master/test_images/* ../Pillow/Tests/images From 335488e4ba96159baaff7689802608713a8a74c8 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 30 Jan 2021 21:43:47 +1100 Subject: [PATCH 7/9] Updated libwebp to 1.2.0 --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index e4f188d1a..44fca1d1a 100644 --- a/config.sh +++ b/config.sh @@ -13,7 +13,7 @@ XZ_VERSION=5.2.5 TIFF_VERSION=4.2.0 LCMS2_VERSION=2.11 GIFLIB_VERSION=5.1.4 -LIBWEBP_VERSION=1.1.0 +LIBWEBP_VERSION=1.2.0 BZIP2_VERSION=1.0.8 LIBXCB_VERSION=1.14 From 988ac607d2037f7c97fb8cd3a84e50893fe6ad60 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 6 Feb 2021 08:49:59 +1100 Subject: [PATCH 8/9] Combined git submodule commands --- update-pillow-tag.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/update-pillow-tag.sh b/update-pillow-tag.sh index 9bf037bd5..31ee10094 100755 --- a/update-pillow-tag.sh +++ b/update-pillow-tag.sh @@ -8,8 +8,7 @@ if [ $# -eq 0 ]; then fi git checkout master -git submodule init -git submodule update Pillow +git submodule update --init Pillow cd Pillow git fetch --all git checkout $1 From d69138f4b779b667b0d502d7861a8b40c167a4b1 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 6 Feb 2021 14:52:34 +1100 Subject: [PATCH 9/9] multibuild now includes PyPy 7.3.3 --- .github/workflows/build.sh | 2 -- multibuild | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 6844b59f2..ec8d89dde 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -17,8 +17,6 @@ fi echo "::group::Install a virtualenv" source multibuild/common_utils.sh source multibuild/travis_steps.sh - # can't use default 7.3.1 on macOS due to https://foss.heptapod.net/pypy/pypy/-/issues/3229 - LATEST_PP_7p3=7.3.3 python3 -m pip install virtualenv before_install echo "::endgroup::" diff --git a/multibuild b/multibuild index 2bf2b360f..63c1418ea 160000 --- a/multibuild +++ b/multibuild @@ -1 +1 @@ -Subproject commit 2bf2b360f084aaa4b166935c3bd279e2e842f6ff +Subproject commit 63c1418ea5236f2586007c5397dab1d99d4cf1dd