pylint-celery icon indicating copy to clipboard operation
pylint-celery copied to clipboard

Import setup from setuptools

Open stefanor opened this issue 3 years ago • 1 comments

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 avatar Nov 12 '22 16:11 stefanor

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

stefanor avatar Dec 01 '22 18:12 stefanor