From 82204d54cf6467107110e218f98b9fb725437a8f Mon Sep 17 00:00:00 2001 From: nulano Date: Sun, 24 May 2020 01:07:42 +0200 Subject: [PATCH] fix #2848 --- .github/workflows/test-windows.yml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 7e52651ba..2ad2bf1f6 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -432,6 +432,7 @@ jobs: ${{ matrix.package }}-lcms2 \ ${{ matrix.package }}-libwebp \ ${{ matrix.package }}-libjpeg-turbo \ + ${{ matrix.package }}-openjpeg2 \ ${{ matrix.package }}-libimagequant \ ${{ matrix.package }}-libraqm \ ${{ matrix.package }}-ghostscript \ @@ -444,8 +445,7 @@ jobs: - name: Build Pillow run: | # libtiff is unable to open files - # OpenJPEG fails due to link error (#2848) - python3 setup.py build_ext --disable-tiff --disable-jpeg2000 install + python3 setup.py build_ext --disable-tiff install - name: Test Pillow run: | diff --git a/setup.py b/setup.py index 8c9f0213f..b7982a5ba 100755 --- a/setup.py +++ b/setup.py @@ -711,7 +711,7 @@ class pil_build_ext(build_ext): if feature.jpeg2000: libs.append(feature.jpeg2000) defs.append(("HAVE_OPENJPEG", None)) - if sys.platform == "win32": + if sys.platform == "win32" and not PLATFORM_MINGW: defs.append(("OPJ_STATIC", None)) if feature.zlib: libs.append(feature.zlib)