mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 19:36:38 +03:00
Use zlib-ng on Linux
This commit is contained in:
parent
3f5f3bb07b
commit
69c9a7ffcf
20
.github/workflows/wheels-dependencies.sh
vendored
20
.github/workflows/wheels-dependencies.sh
vendored
|
@ -50,10 +50,10 @@ if [[ -n "$IS_MACOS" ]]; then
|
||||||
else
|
else
|
||||||
GIFLIB_VERSION=5.2.1
|
GIFLIB_VERSION=5.2.1
|
||||||
fi
|
fi
|
||||||
if [[ -n "$IS_MACOS" ]] || [[ "$MB_ML_VER" != 2014 ]]; then
|
if [[ -n "$IS_MACOS" ]]; then
|
||||||
ZLIB_VERSION=1.3.1
|
ZLIB_VERSION=1.3.1
|
||||||
else
|
else
|
||||||
ZLIB_VERSION=1.2.8
|
ZLIB_NG_VERSION=2.2.2
|
||||||
fi
|
fi
|
||||||
LIBWEBP_VERSION=1.4.0
|
LIBWEBP_VERSION=1.4.0
|
||||||
BZIP2_VERSION=1.0.8
|
BZIP2_VERSION=1.0.8
|
||||||
|
@ -74,6 +74,16 @@ function build_pkg_config {
|
||||||
touch pkg-config-stamp
|
touch pkg-config-stamp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build_zlib_ng {
|
||||||
|
if [ -e zlib-stamp ]; then return; fi
|
||||||
|
fetch_unpack https://github.com/zlib-ng/zlib-ng/archive/$ZLIB_NG_VERSION.tar.gz zlib-ng-$ZLIB_NG_VERSION.tar.gz
|
||||||
|
(cd zlib-ng-$ZLIB_NG_VERSION \
|
||||||
|
&& ./configure --prefix=$BUILD_PREFIX --zlib-compat \
|
||||||
|
&& make -j4 \
|
||||||
|
&& make install)
|
||||||
|
touch zlib-stamp
|
||||||
|
}
|
||||||
|
|
||||||
function build_brotli {
|
function build_brotli {
|
||||||
if [ -e brotli-stamp ]; then return; fi
|
if [ -e brotli-stamp ]; then return; fi
|
||||||
local cmake=$(get_modern_cmake)
|
local cmake=$(get_modern_cmake)
|
||||||
|
@ -101,7 +111,11 @@ function build {
|
||||||
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
|
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
|
||||||
yum remove -y zlib-devel
|
yum remove -y zlib-devel
|
||||||
fi
|
fi
|
||||||
build_new_zlib
|
if [ -n "$IS_MACOS" ]; then
|
||||||
|
build_new_zlib
|
||||||
|
else
|
||||||
|
build_zlib_ng
|
||||||
|
fi
|
||||||
|
|
||||||
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
|
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
|
||||||
if [ -n "$IS_MACOS" ]; then
|
if [ -n "$IS_MACOS" ]; then
|
||||||
|
|
|
@ -40,7 +40,7 @@ def test_wheel_features() -> None:
|
||||||
|
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
expected_features.remove("xcb")
|
expected_features.remove("xcb")
|
||||||
else:
|
elif sys.platform == "darwin":
|
||||||
expected_features.remove("zlib_ng")
|
expected_features.remove("zlib_ng")
|
||||||
|
|
||||||
assert set(features.get_supported_features()) == expected_features
|
assert set(features.get_supported_features()) == expected_features
|
||||||
|
|
Loading…
Reference in New Issue
Block a user