mirror of
https://gitlab.com/libvirt/libvirt-python.git
synced 2025-07-15 20:59:34 +03:00
setup: replace distutils.dir_util.remove_tree with shutils
The distutils.dir_util.remove_tree 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
@ -3,7 +3,6 @@
|
|||||||
from distutils.core import setup, Extension, Command
|
from distutils.core import setup, Extension, Command
|
||||||
from distutils.command.build import build
|
from distutils.command.build import build
|
||||||
from distutils.command.sdist import sdist
|
from distutils.command.sdist import sdist
|
||||||
from distutils.dir_util import remove_tree
|
|
||||||
from distutils.util import get_platform
|
from distutils.util import get_platform
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
@ -298,7 +297,7 @@ class my_test(Command):
|
|||||||
class my_clean(Command):
|
class my_clean(Command):
|
||||||
def run(self):
|
def run(self):
|
||||||
if os.path.exists("build"):
|
if os.path.exists("build"):
|
||||||
remove_tree("build")
|
shutil.rmtree("build", ignore_errors=True)
|
||||||
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
|
Reference in New Issue
Block a user