mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Added fallback for finding ld on MinGW Cygwin
This commit is contained in:
parent
845377d83f
commit
3fbea03026
12
setup.py
12
setup.py
|
@ -118,6 +118,18 @@ class RequiredDependencyException(Exception):
|
|||
PLATFORM_MINGW = "mingw" in ccompiler.get_default_compiler()
|
||||
PLATFORM_PYPY = hasattr(sys, "pypy_version_info")
|
||||
|
||||
if sys.platform == "win32" and PLATFORM_MINGW:
|
||||
from distutils import cygwinccompiler
|
||||
|
||||
cygwin_versions = cygwinccompiler.get_versions()
|
||||
if cygwin_versions[1] is None:
|
||||
# ld version is None
|
||||
# distutils cygwinccompiler might fetch the ld path from gcc
|
||||
# Try the normal path instead
|
||||
cygwin_versions = list(cygwin_versions)
|
||||
cygwin_versions[1] = cygwinccompiler._find_exe_version("ld -v")
|
||||
cygwinccompiler.get_versions = lambda: tuple(cygwin_versions)
|
||||
|
||||
|
||||
def _dbg(s, tp=None):
|
||||
if DEBUG:
|
||||
|
|
|
@ -3,12 +3,16 @@
|
|||
mkdir /var/cache/pacman/pkg
|
||||
pacman -S --noconfirm mingw32/mingw-w64-i686-python3-pip \
|
||||
mingw32/mingw-w64-i686-python3-setuptools \
|
||||
mingw32/mingw-w64-i686-python3-pytest \
|
||||
mingw32/mingw-w64-i686-python3-pytest-cov \
|
||||
mingw32/mingw-w64-i686-python2-pip \
|
||||
mingw32/mingw-w64-i686-python2-setuptools \
|
||||
mingw32/mingw-w64-i686-python2-pytest \
|
||||
mingw32/mingw-w64-i686-python2-pytest-cov \
|
||||
mingw-w64-i686-libjpeg-turbo \
|
||||
mingw-w64-i686-libimagequant
|
||||
|
||||
C:/msys64/mingw32/bin/python3 -m pip install --upgrade pip
|
||||
|
||||
/mingw32/bin/pip install pytest pytest-cov olefile
|
||||
/mingw32/bin/pip3 install pytest pytest-cov olefile
|
||||
/mingw32/bin/pip install olefile
|
||||
/mingw32/bin/pip3 install olefile
|
||||
|
|
Loading…
Reference in New Issue
Block a user