FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MSYS2 fixes by nulano · Pull Request #4890 · python-pillow/Pillow · GitHub

MSYS2 fixes - #4890

Merged
hugovk merged 5 commits into
python-pillow:masterfrom
nulano:mingw-setup
Sep 3, 2020
Merged

MSYS2 fixes#4890
hugovk merged 5 commits into
python-pillow:masterfrom
nulano:mingw-setup

Conversation

nulano commented Aug 30, 2020
edited
Loading

Copy link
Copy Markdown
Contributor

Changes proposed in this pull request:

  • Remove old include directory C:\\msys64\\mingw32\\include\\libimagequant.

    It uses a hardcoded path to MSYS2, it is hardcoded to 32-bit, and it is no longer necessary, as the include is now in C:\\msys64\\mingw32\\include\\libimagequant.h.

  • Remove GCC workaround for MSYS, see Replace distutils #4796 (comment)

    The issue was that AppVeyor was missing the MSYSTEM=MINGW32 envvar, and getting confused by the default MSYSTEM=MSYS2.

  • Fix LibTiff support. The issue is that MSYS2 builds LibTiff with USE_WIN32_FILEIO, which changes the meaning of the fd parameter for TIFFFdOpen, see OSError: -2 when decoding a tiff_lzw file #4237 (comment). I've added a workaround by converting the parameter before passing it to LibTiff if building on MinGW.

    It might be possible to detect the system version of LibTiff by including the tif_config.h header to fix OSError: -2 when decoding a tiff_lzw file #4237 (by enabling the workaround if USE_WIN32_FILEIO was enabled), but it appears to be a private header (while it is available in MSYS2, it is not available in Ubuntu). See also passing build using CMake on Windows from my branch nulano/Pillow@mingw-setup...nulano:tiff-test.

    Another possible fix would involve absorbing TIFFFdOpen from tif_unix.c into Pillow to avoid this issue by using the stable TiffClientOpen.

  • Document installation on MSYS2

nulano added 4 commits August 30, 2020 00:57
1) it is hardcoded to 32-bit C:\msys64\mingw32
2) current library version uses \mingw64\include\libimagequant.h directly
nulano mentioned this pull request Aug 30, 2020
Comment thread docs/installation.rst
Comment on lines +324 to +332
mingw-w64-x86_64-libjpeg-turbo \
mingw-w64-x86_64-zlib \
mingw-w64-x86_64-libtiff \
mingw-w64-x86_64-freetype \
mingw-w64-x86_64-lcms2 \
mingw-w64-x86_64-libwebp \
mingw-w64-x86_64-openjpeg2 \
mingw-w64-x86_64-libimagequant \
mingw-w64-x86_64-libraqm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
mingw-w64-x86_64-libjpeg-turbo \
mingw-w64-x86_64-zlib \
mingw-w64-x86_64-libtiff \
mingw-w64-x86_64-freetype \
mingw-w64-x86_64-lcms2 \
mingw-w64-x86_64-libwebp \
mingw-w64-x86_64-openjpeg2 \
mingw-w64-x86_64-libimagequant \
mingw-w64-x86_64-libraqm
mingw-w64-x86_64-freetype \
mingw-w64-x86_64-lcms2 \
mingw-w64-x86_64-libimagequant \
mingw-w64-x86_64-libjpeg-turbo \
mingw-w64-x86_64-libraqm
mingw-w64-x86_64-libtiff \
mingw-w64-x86_64-libwebp \
mingw-w64-x86_64-openjpeg2 \
mingw-w64-x86_64-zlib \

Sorted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The order is the same as in the External Libraries section above. I think it is more helpful to follow that order for easier cross-referencing if someone doesn't want a full install.

lazka commented Aug 31, 2020

Copy link
Copy Markdown

hugovk merged commit 63d8a60 into python-pillow:master Sep 3, 2020

hugovk commented Sep 3, 2020

Copy link
Copy Markdown
Member

Thanks!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL