Skip to content

Commit 6c7917d

Browse files
committed
Revert to zlib on macOS < 10.15
1 parent 33ce014 commit 6c7917d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/wheels-dependencies.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ OPENJPEG_VERSION=2.5.3
4545
XZ_VERSION=5.6.4
4646
TIFF_VERSION=4.7.0
4747
LCMS2_VERSION=2.17
48+
ZLIB_VERSION=1.3.1
4849
ZLIB_NG_VERSION=2.2.4
4950
LIBWEBP_VERSION=1.5.0
5051
BZIP2_VERSION=1.0.8
@@ -106,7 +107,11 @@ function build {
106107
if [ -z "$IS_ALPINE" ] && [ -z "$SANITIZER" ] && [ -z "$IS_MACOS" ]; then
107108
yum remove -y zlib-devel
108109
fi
109-
build_zlib_ng
110+
if [[ -n "$IS_MACOS" ]] && [[ "$MACOSX_DEPLOYMENT_TARGET" == "10.10" || "$MACOSX_DEPLOYMENT_TARGET" == "10.13" ]]; then
111+
build_new_zlib
112+
else
113+
build_zlib_ng
114+
fi
110115

111116
build_simple xcb-proto 1.17.0 https://xorg.freedesktop.org/archive/individual/proto
112117
if [ -n "$IS_MACOS" ]; then

Tests/check_wheel.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
from __future__ import annotations
22

3+
import platform
34
import sys
45

56
from PIL import features
67

8+
from .helper import is_pypy
9+
710

811
def test_wheel_modules() -> None:
912
expected_modules = {"pil", "tkinter", "freetype2", "littlecms2", "webp"}
@@ -40,5 +43,7 @@ def test_wheel_features() -> None:
4043

4144
if sys.platform == "win32":
4245
expected_features.remove("xcb")
46+
elif sys.platform == "darwin" and not is_pypy() and platform.processor() != "arm":
47+
expected_features.remove("zlib_ng")
4348

4449
assert set(features.get_supported_features()) == expected_features

0 commit comments

Comments
 (0)