diff options
author | Cole Robinson <crobinso@redhat.com> | 2022-01-27 10:18:12 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2022-01-27 10:19:43 -0500 |
commit | 7ee01c7eeb7478a4a1f905c31422ab4fdfdca90d (patch) | |
tree | 0e8fbb9ea17578d0b69cbc51d224f403b1c1d785 /setup.py | |
parent | 16fecb482a8a40f52e42a0b3909292ab4fedef4d (diff) | |
download | virt-manager-7ee01c7eeb7478a4a1f905c31422ab4fdfdca90d.tar.gz |
setup: Plan for newer setuptools providing distutils back compat
setuptools still doesn't natively provide some infrastructure we
need, but newer versions will keep 'import distutils' working until
those issues are addressed. I think we need to reorder imports to take
advantage of it though. It silences some deprecation warnings at
least
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -17,16 +17,21 @@ import shutil import sysconfig import subprocess -# distutils will be deprecated in python 3.12 in favor of setuptools, -# but as of this writing there's standard no setuptools way to extend the -# 'build' or 'build_scripts' commands which are the only standard -# commands we trigger. -import distutils.command.build - import setuptools import setuptools.command.install import setuptools.command.install_egg_info + +# distutils will be deprecated in python 3.12 in favor of setuptools, +# but as of this writing there's standard no setuptools way to extend the +# 'build' commands which are the only standard commands we trigger. +# https://github.com/pypa/setuptools/issues/2591 +# +# Newer setuptools will transparently support 'import distutils' though. +# That can be overridden with SETUPTOOLS_USE_DISTUTILS env variable +import distutils.command.build # pylint: disable=wrong-import-order + + SYSPREFIX = sysconfig.get_config_var("prefix") |