Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MSYS2 is a POSIX-complaint environment for Windows. It provides PE binaries built from MinGW-w64 compilers, through pacman which MSYS2 team successfully ported.
I installed
mingw-w64-i686-python3
,mingw-w64-i686-pip3
,mingw-w64-imagemagick
using MSYS2 pacman, then runpip3 install wand
. It was successful butimport wand.image
did not work. It was because ImageMagick binaries were installed as/mingw32/bin/libMagick(Core|Wand)-6.Q16HDRI-2.dll
(with no$MAGICK_HOME
) in my case. As current Wand searches forCORE_RL_(wand|magick)_<suffix>(.dll)
on Windows andlibMagickWand<suffix>(.so)
for almost others, Wand couldn't find the binaries in my case.This PR includes two commit of changeset over
wand/api.py
. The former one changes the structure of ImageMagick library probing procedure.find_library()
, now renamedlibrary_paths()
, became a generator function that iterates for possible library paths. Thenload_library()
checks if each path is loadable, viactypes.CDLL()
. The latter one, finally appends more example for library path that succeeds in case of MSYS2.Manually tested in:
Thanks to @dahlia who provided proper feedback for me to write these changes.