mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-08-02 04:21:59 +03:00
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>
This commit is contained in:
3
setup.py
3
setup.py
@ -7,7 +7,6 @@ from distutils.dir_util import remove_tree
|
|||||||
from distutils.util import get_platform
|
from distutils.util import get_platform
|
||||||
from distutils.spawn import spawn
|
from distutils.spawn import spawn
|
||||||
from distutils.errors import DistutilsExecError
|
from distutils.errors import DistutilsExecError
|
||||||
import distutils
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
@ -275,7 +274,7 @@ class my_test(Command):
|
|||||||
]
|
]
|
||||||
|
|
||||||
for binary in binaries:
|
for binary in binaries:
|
||||||
path = distutils.spawn.find_executable(binary)
|
path = shutil.which(binary)
|
||||||
if path is not None:
|
if path is not None:
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user