Skip to content

Commit 82204d5

Browse files
committed
fix #2848
1 parent d2f90d6 commit 82204d5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/test-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ jobs:
432432
${{ matrix.package }}-lcms2 \
433433
${{ matrix.package }}-libwebp \
434434
${{ matrix.package }}-libjpeg-turbo \
435+
${{ matrix.package }}-openjpeg2 \
435436
${{ matrix.package }}-libimagequant \
436437
${{ matrix.package }}-libraqm \
437438
${{ matrix.package }}-ghostscript \
@@ -444,8 +445,7 @@ jobs:
444445
- name: Build Pillow
445446
run: |
446447
# libtiff is unable to open files
447-
# OpenJPEG fails due to link error (#2848)
448-
python3 setup.py build_ext --disable-tiff --disable-jpeg2000 install
448+
python3 setup.py build_ext --disable-tiff install
449449
450450
- name: Test Pillow
451451
run: |

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ def build_extensions(self):
711711
if feature.jpeg2000:
712712
libs.append(feature.jpeg2000)
713713
defs.append(("HAVE_OPENJPEG", None))
714-
if sys.platform == "win32":
714+
if sys.platform == "win32" and not PLATFORM_MINGW:
715715
defs.append(("OPJ_STATIC", None))
716716
if feature.zlib:
717717
libs.append(feature.zlib)

0 commit comments

Comments
 (0)