mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 03:16:18 +03:00
Merge branch 'master' into for-5062
This commit is contained in:
commit
51ca11de79
10
.github/workflows/build.sh
vendored
10
.github/workflows/build.sh
vendored
|
@ -17,8 +17,6 @@ fi
|
||||||
echo "::group::Install a virtualenv"
|
echo "::group::Install a virtualenv"
|
||||||
source multibuild/common_utils.sh
|
source multibuild/common_utils.sh
|
||||||
source multibuild/travis_steps.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
|
python3 -m pip install virtualenv
|
||||||
before_install
|
before_install
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
@ -29,6 +27,8 @@ echo "::group::Build wheel"
|
||||||
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
|
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Test wheel"
|
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
|
||||||
install_run $PLAT
|
echo "::group::Test wheel"
|
||||||
echo "::endgroup::"
|
install_run $PLAT
|
||||||
|
echo "::endgroup::"
|
||||||
|
fi
|
15
.github/workflows/wheels.yml
vendored
15
.github/workflows/wheels.yml
vendored
|
@ -7,7 +7,6 @@ env:
|
||||||
REPO_DIR: Pillow
|
REPO_DIR: Pillow
|
||||||
BUILD_DEPENDS: ""
|
BUILD_DEPENDS: ""
|
||||||
TEST_DEPENDS: "pytest pytest-cov"
|
TEST_DEPENDS: "pytest pytest-cov"
|
||||||
MACOSX_DEPLOYMENT_TARGET: "10.10"
|
|
||||||
WHEEL_SDIR: wheelhouse
|
WHEEL_SDIR: wheelhouse
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -20,6 +19,7 @@ jobs:
|
||||||
os: [ "ubuntu-16.04", "macos-latest" ]
|
os: [ "ubuntu-16.04", "macos-latest" ]
|
||||||
python: [ "pypy3.7-7.3.3","pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ]
|
python: [ "pypy3.7-7.3.3","pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ]
|
||||||
platform: [ "x86_64", "i686" ]
|
platform: [ "x86_64", "i686" ]
|
||||||
|
macos-target: [ "10.10" ]
|
||||||
exclude:
|
exclude:
|
||||||
- os: "macos-latest"
|
- os: "macos-latest"
|
||||||
platform: "i686"
|
platform: "i686"
|
||||||
|
@ -28,11 +28,17 @@ jobs:
|
||||||
os-name: "osx"
|
os-name: "osx"
|
||||||
- os: "ubuntu-16.04"
|
- os: "ubuntu-16.04"
|
||||||
os-name: "xenial"
|
os-name: "xenial"
|
||||||
|
- os: "macos-11.0"
|
||||||
|
os-name: "osx"
|
||||||
|
platform: "arm64"
|
||||||
|
python: "3.9"
|
||||||
|
macos-target: "11.0"
|
||||||
env:
|
env:
|
||||||
BUILD_COMMIT: HEAD
|
BUILD_COMMIT: HEAD
|
||||||
PLAT: ${{ matrix.platform }}
|
PLAT: ${{ matrix.platform }}
|
||||||
MB_PYTHON_VERSION: ${{ matrix.python }}
|
MB_PYTHON_VERSION: ${{ matrix.python }}
|
||||||
TRAVIS_OS_NAME: ${{ matrix.os-name }}
|
TRAVIS_OS_NAME: ${{ matrix.os-name }}
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -61,6 +67,7 @@ jobs:
|
||||||
os: [ "ubuntu-16.04", "macos-latest" ]
|
os: [ "ubuntu-16.04", "macos-latest" ]
|
||||||
python: [ "pypy3.7-7.3.3", "pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ]
|
python: [ "pypy3.7-7.3.3", "pypy3.6-7.3", "3.6", "3.7", "3.8", "3.9" ]
|
||||||
platform: [ "x86_64", "i686" ]
|
platform: [ "x86_64", "i686" ]
|
||||||
|
macos-target: [ "10.10" ]
|
||||||
exclude:
|
exclude:
|
||||||
- os: "macos-latest"
|
- os: "macos-latest"
|
||||||
platform: "i686"
|
platform: "i686"
|
||||||
|
@ -69,11 +76,17 @@ jobs:
|
||||||
os-name: "osx"
|
os-name: "osx"
|
||||||
- os: "ubuntu-16.04"
|
- os: "ubuntu-16.04"
|
||||||
os-name: "xenial"
|
os-name: "xenial"
|
||||||
|
- os: "macos-11.0"
|
||||||
|
os-name: "osx"
|
||||||
|
platform: "arm64"
|
||||||
|
python: "3.9"
|
||||||
|
macos-target: "11.0"
|
||||||
env:
|
env:
|
||||||
BUILD_COMMIT: master
|
BUILD_COMMIT: master
|
||||||
PLAT: ${{ matrix.platform }}
|
PLAT: ${{ matrix.platform }}
|
||||||
MB_PYTHON_VERSION: ${{ matrix.python }}
|
MB_PYTHON_VERSION: ${{ matrix.python }}
|
||||||
TRAVIS_OS_NAME: ${{ matrix.os-name }}
|
TRAVIS_OS_NAME: ${{ matrix.os-name }}
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|
43
.travis.yml
43
.travis.yml
|
@ -47,48 +47,6 @@ jobs:
|
||||||
- MB_PYTHON_VERSION=3.9
|
- MB_PYTHON_VERSION=3.9
|
||||||
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
|
- 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:
|
before_install:
|
||||||
- source multibuild/common_utils.sh
|
- source multibuild/common_utils.sh
|
||||||
- source multibuild/travis_steps.sh
|
- source multibuild/travis_steps.sh
|
||||||
|
@ -114,5 +72,4 @@ deploy:
|
||||||
on:
|
on:
|
||||||
condition: -z "$LATEST"
|
condition: -z "$LATEST"
|
||||||
repo: python-pillow/pillow-wheels
|
repo: python-pillow/pillow-wheels
|
||||||
tags: true
|
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|
2
Pillow
2
Pillow
|
@ -1 +1 @@
|
||||||
Subproject commit d209b7cab2866cbf381cbfc193f57de91a403757
|
Subproject commit fcc42e0d344146ee9d265d1f43c094ce5a0ec4cf
|
57
config.sh
57
config.sh
|
@ -1,5 +1,5 @@
|
||||||
# Define custom utilities
|
# Define custom utilities
|
||||||
# Test for OS X with [ -n "$IS_OSX" ]
|
# Test for macOS with [ -n "$IS_MACOS" ]
|
||||||
|
|
||||||
ARCHIVE_SDIR=pillow-depends-master
|
ARCHIVE_SDIR=pillow-depends-master
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ XZ_VERSION=5.2.5
|
||||||
TIFF_VERSION=4.2.0
|
TIFF_VERSION=4.2.0
|
||||||
LCMS2_VERSION=2.11
|
LCMS2_VERSION=2.11
|
||||||
GIFLIB_VERSION=5.1.4
|
GIFLIB_VERSION=5.1.4
|
||||||
LIBWEBP_VERSION=1.1.0
|
LIBWEBP_VERSION=1.2.0
|
||||||
BZIP2_VERSION=1.0.8
|
BZIP2_VERSION=1.0.8
|
||||||
LIBXCB_VERSION=1.14
|
LIBXCB_VERSION=1.14
|
||||||
|
|
||||||
|
@ -38,27 +38,29 @@ function pre_build {
|
||||||
# Runs in the root directory of this repository.
|
# 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
|
curl -fsSL -o pillow-depends-master.zip https://github.com/python-pillow/pillow-depends/archive/master.zip
|
||||||
untar pillow-depends-master.zip
|
untar pillow-depends-master.zip
|
||||||
if [ -n "$IS_OSX" ]; then
|
if [ -n "$IS_MACOS" ]; then
|
||||||
# Update to latest zlib for OS X build
|
# Update to latest zlib for macOS build
|
||||||
build_new_zlib
|
build_new_zlib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$IS_OSX" ]; then
|
if [ -n "$IS_MACOS" ]; then
|
||||||
ORIGINAL_BUILD_PREFIX=$BUILD_PREFIX
|
ORIGINAL_BUILD_PREFIX=$BUILD_PREFIX
|
||||||
ORIGINAL_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
|
ORIGINAL_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
|
||||||
BUILD_PREFIX=`dirname $(dirname $(which python))`
|
BUILD_PREFIX=`dirname $(dirname $(which python))`
|
||||||
PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig"
|
PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig"
|
||||||
fi
|
fi
|
||||||
build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist
|
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
|
||||||
if [ -n "$IS_OSX" ]; then
|
build_simple xcb-proto 1.14.1 https://xcb.freedesktop.org/dist
|
||||||
build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto
|
if [ -n "$IS_MACOS" ]; then
|
||||||
build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib
|
build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto
|
||||||
build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist
|
build_simple libXau 1.0.9 https://www.x.org/pub/individual/lib
|
||||||
else
|
build_simple libpthread-stubs 0.4 https://xcb.freedesktop.org/dist
|
||||||
sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc
|
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
|
fi
|
||||||
build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist
|
if [ -n "$IS_MACOS" ]; then
|
||||||
if [ -n "$IS_OSX" ]; then
|
|
||||||
BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX
|
BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX
|
||||||
PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH
|
PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH
|
||||||
fi
|
fi
|
||||||
|
@ -72,13 +74,15 @@ function pre_build {
|
||||||
build_tiff
|
build_tiff
|
||||||
build_libpng
|
build_libpng
|
||||||
build_lcms2
|
build_lcms2
|
||||||
build_openjpeg
|
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
|
||||||
|
build_openjpeg
|
||||||
|
fi
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -O3 -DNDEBUG"
|
CFLAGS="$CFLAGS -O3 -DNDEBUG"
|
||||||
build_libwebp
|
build_libwebp
|
||||||
CFLAGS=$ORIGINAL_CFLAGS
|
CFLAGS=$ORIGINAL_CFLAGS
|
||||||
|
|
||||||
if [ -n "$IS_OSX" ]; then
|
if [ -n "$IS_MACOS" ]; then
|
||||||
# Custom freetype build
|
# Custom freetype build
|
||||||
build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no --with-brotli=no
|
build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no --with-brotli=no
|
||||||
else
|
else
|
||||||
|
@ -119,21 +123,32 @@ function run_tests_in_repo {
|
||||||
pytest
|
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_MODULES="freetype2 littlecms2 pil tkinter webp"
|
||||||
if [ -z "$IS_OSX" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]]; then
|
if [ -z "$IS_OSX" ] && [[ "$MB_PYTHON_VERSION" != pypy3* ]]; then
|
||||||
EXP_FEATURES="fribidi harfbuzz raqm transp_webp webp_anim webp_mux xcb"
|
EXP_FEATURES="fribidi harfbuzz raqm transp_webp webp_anim webp_mux"
|
||||||
else
|
else
|
||||||
# can't find FriBiDi
|
# can't find FriBiDi
|
||||||
EXP_FEATURES="transp_webp webp_anim webp_mux xcb"
|
EXP_FEATURES="transp_webp webp_anim webp_mux"
|
||||||
|
fi
|
||||||
|
if [[ $MACOSX_DEPLOYMENT_TARGET != "11.0" ]]; then
|
||||||
|
EXP_FEATURES="$EXP_FEATURES xcb"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function run_tests {
|
function run_tests {
|
||||||
if [ -n "$IS_OSX" ]; then
|
if [ -n "$IS_MACOS" ]; then
|
||||||
brew install openblas
|
brew install openblas
|
||||||
echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg
|
echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg
|
||||||
fi
|
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
|
mv ../pillow-depends-master/test_images/* ../Pillow/Tests/images
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8882150df6529658700b66bec124dfb77eefca26
|
Subproject commit 63c1418ea5236f2586007c5397dab1d99d4cf1dd
|
|
@ -8,8 +8,7 @@ if [ $# -eq 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git checkout master
|
git checkout master
|
||||||
git submodule init
|
git submodule update --init Pillow
|
||||||
git submodule update Pillow
|
|
||||||
cd Pillow
|
cd Pillow
|
||||||
git fetch --all
|
git fetch --all
|
||||||
git checkout $1
|
git checkout $1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user