Merge pull request #4633 from cgohlke/patch-1

This commit is contained in:
Hugo van Kemenade 2020-05-20 14:55:17 +03:00 committed by GitHub
commit 23ade03d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -730,7 +730,11 @@ class pil_build_ext(build_ext):
if struct.unpack("h", b"\0\1")[0] == 1:
defs.append(("WORDS_BIGENDIAN", None))
if sys.platform == "win32" and not (PLATFORM_PYPY or PLATFORM_MINGW):
if (
sys.platform == "win32"
and sys.version_info < (3, 9)
and not (PLATFORM_PYPY or PLATFORM_MINGW)
):
defs.append(("PILLOW_VERSION", '"\\"%s\\""' % PILLOW_VERSION))
else:
defs.append(("PILLOW_VERSION", '"%s"' % PILLOW_VERSION))