Improve fallback for unset CC env-var in pillow_mingw.patch

This commit is contained in:
Sandro Mani 2022-06-30 22:50:29 +02:00
parent 999f5aa991
commit d649e264ff

View File

@ -6,7 +6,7 @@ diff -rupN --no-dereference Pillow-9.1.1/setup.py Pillow-9.1.1-new/setup.py
-PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version -PLATFORM_MINGW = os.name == "nt" and "GCC" in sys.version
+PLATFORM_MINGW = "mingw32" in os.getenv("CC", []) +PLATFORM_MINGW = "mingw32" in os.getenv("CC", "")
PLATFORM_PYPY = hasattr(sys, "pypy_version_info") PLATFORM_PYPY = hasattr(sys, "pypy_version_info")