Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use double quotes for version check on old CPython on Windows #6695

merged 1 commit into from Oct 29, 2022


Copy link

@hugovk hugovk commented Oct 28, 2022

Fixes #6437.

@cgohlke found a failure with setuptools 65 on Python 3.7-3.8 but with SETUPTOOLS_USE_DISTUTILS=stdlib

Testing a CI matrix on Windows with:

        python-version: ["3.7", "3.8", "3.9"]
        architecture: ["x64"]
        SETUPTOOLS_USE_DISTUTILS: ["", "stdlib"]
        setuptools-max-version: ["60", "66"]

I find that:

CPython SETUPTOOLS_USE_DISTUTILS setuptools Quotes needed
3.7   <60 double
3.7   <66 double
3.7 stdlib <60 double
3.7 stdlib <66 double
3.8   <60 double
3.8   <66 double
3.8 stdlib <60 double
3.8 stdlib <66 double
3.9   <60 single
3.9   <66 single
3.9 stdlib <60 single
3.9 stdlib <66 single

Testing this fix on the same matrix passes for all:

Copy link

So this is just reverting #6450. My best guess is that something else in our Windows build process changed in the meantime.

Copy link
Member Author

hugovk commented Oct 28, 2022

Yeah, possibly also changes in setuptools versions somewhere between 59 and 65. There's been quite a lot of changes in setuptools in an attempt to modernise "a hot mess of legacy code", and I expect more.

And distutils is planned to be removed in Python 3.12 (October 2023), which the vendoring of distutils into setuptools 60 is a first step.

It might be worth seeing if we can migrate away from setuptool to something more modern, such as hatchling, but with a thousand-line it's certainly not a job for release day :)

@hugovk hugovk merged commit e849e93 into python-pillow:main Oct 29, 2022
60 checks passed
@hugovk hugovk deleted the fix-setuptools branch October 29, 2022 07:53
@radarhere radarhere changed the title Double quotes for old CPython on Windows Use double quotes for version check on old CPython on Windows Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

import PIL.Image double quotes for Core version: "9.2.0" on win-64 for python 3.7 and python 3.8
2 participants