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.
In this case, let's just remove distutils, entirely.
This change in setuptools is to prepare for Python 3.12, which will drop distutils.
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.
In this case, let's just remove distutils, entirely.
This change in setuptools is to prepare for Python 3.12, which will drop distutils.