Avoid installing distutils after its scheduled removal

master
luk3yx 2021-04-25 18:59:23 +12:00
parent 858e50aa0b
commit ecefa2b5b0
1 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,8 @@ def bootstrap_distutils():
Bootstrap installs distutils on Debian systems. This is horrible and should
probably be avoided if possible.
"""
if importlib.util.find_spec('distutils.util') is not None:
if (importlib.util.find_spec('distutils.util') is not None and
sys.version_info < (3, 12)):
return
print('[This should never happen] Downloading distutils...')