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

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

Conversation

stefanor
Copy link

@stefanor stefanor commented Nov 12, 2022

Description

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/1022482 and https://bugs.debian.org/1022538

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

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/1022482 and https://bugs.debian.org/1022538
@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.

@tobiasjaster tobiasjaster mentioned this pull request Jun 9, 2024
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