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

Import setup from setuptools #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefanor
Copy link

setuptools 60 uses its own bundled version of distutils, by default. It injects this into sys.modules, at import time. So we need to make sure that it is imported, before anything else imports distutils, to ensure everything is using the same distutils version.

This change in setuptools is to prepare for Python 3.12, which will drop distutils.

In this case, the best way to deal with the problem is to just use setuptools' setup().

Fixes: https://bugs.debian.org/1022481

setuptools 60 uses its own bundled version of distutils, by default. It
injects this into sys.modules, at import time. So we need to make sure
that it is imported, before anything else imports distutils, to ensure
everything is using the same distutils version.

This change in setuptools is to prepare for Python 3.12, which will drop
distutils.

In this case, the best way to deal with the problem is to just use
setuptools' setup().

Fixes: https://bugs.debian.org/1022481
@stefanor
Copy link
Author

stefanor commented Dec 1, 2022

FWIW, the underlying bug I was describing is https://bugs.debian.org/1025216 but this change is still a worthwhile cleanup, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant