summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2022-03-23 10:49:16 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2022-04-21 12:34:06 +0100
commit7d14f77224d7482c00b78a5ad1539e28f0feaefb (patch)
treeb579293986eaaabd6b2ab543c8905918b4f0cd1d
parent49f0b4c16fd2472dfbd939f8cb52096061ed9094 (diff)
downloadlibvirt-python-7d14f77224d7482c00b78a5ad1539e28f0feaefb.tar.gz
setup: replace distutils.spawn.find_executable with shutils
The distutils.spawn.find_executable method has no compelling benefit over using the standard python shutils module. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
-rwxr-xr-xsetup.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 9de1188..911658c 100755
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,6 @@ from distutils.dir_util import remove_tree
from distutils.util import get_platform
from distutils.spawn import spawn
from distutils.errors import DistutilsExecError
-import distutils
import sys
import os
@@ -275,7 +274,7 @@ class my_test(Command):
]
for binary in binaries:
- path = distutils.spawn.find_executable(binary)
+ path = shutil.which(binary)
if path is not None:
return path