Don't set SETUPTOOLS_USE_DISTUTILS=stdlib when distutils does not exist

Python 3.12.0a2 removed the standard library distutils module,
so we can no longer use it.
This commit is contained in:
Miro Hrončok 2022-11-16 00:10:19 +01:00
commit df6c0cef6e

View file

@ -26,7 +26,8 @@ export OPENSSL_CONF=/non-existing-file
# setuptools 60+ uses its own copy of distutils by default
# this setting must be overriden with the environment variable for
# Python tests to use the standard library's distutils
export SETUPTOOLS_USE_DISTUTILS=stdlib
# We only do this if stdlib distutils actually exists
$PYTHON -c 'import distutils' 2>/dev/null && export SETUPTOOLS_USE_DISTUTILS=stdlib || true
$PYTHON -m test.pythoninfo
$PYTHON -m test -wW -j$JOBS $X