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 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stefanor
Copy link

@stefanor stefanor commented Nov 5, 2022

setuptools 60 uses its own bunlded 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 is to prepare for Python 3.12, which will drop distutils.

In this case, let's just remove distutils entirely.

setuptools 60 uses its own bunlded 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 is to prepare for Python 3.12, which will drop distutils.
@stefanor stefanor changed the title Import setuptools before distutils Import setup from setuptools Nov 13, 2022
@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.

1 participant