Merge pull request #6450 from radarhere/setuptools

Do not quote Pillow version for setuptools >= 60
This commit is contained in:
Hugo van Kemenade 2022-07-18 11:37:35 +03:00 committed by GitHub
commit 04e9854417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,9 @@ import subprocess
import sys
import warnings
from setuptools import Extension, setup
from setuptools import Extension
from setuptools import __version__ as setuptools_version
from setuptools import setup
from setuptools.command.build_ext import build_ext
@ -850,6 +852,7 @@ class pil_build_ext(build_ext):
sys.platform == "win32"
and sys.version_info < (3, 9)
and not (PLATFORM_PYPY or PLATFORM_MINGW)
and int(setuptools_version.split(".")[0]) < 60
):
defs.append(("PILLOW_VERSION", f'"\\"{PILLOW_VERSION}\\""'))
else: