Description
With Python 3.11 release around the corner, the project needs to consider that distutils will be removed in 3.12 https://docs.python.org/3/library/distutils.html
Considering that the setuptools modules contains a copy of it under _distutils, a previous set of patches was merged to move most of the functionality away, but there are still some usages that needs to be addressed, like:
- distutils.log
- distutils.errors.DistutilsSetupError
- distutils.sysconfig
- distutils.msvc9compiler
- distutils.command.build
- distutils.cmd
and a few others.
The initial effort was done based on the Migration Advise section of the PEP related to the deprecation of distutils: https://peps.python.org/pep-0632/#migration-advice but there were still a few things that have no equivalent, and needs to have a local implementation, like distutils.log.