From 5a31e29dccd7bd13c0d36c28218243afe3d76e98 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sun, 16 Aug 2015 02:35:32 +0200 Subject: be more forgiving when file trees cannot be removed (happens often during window debugging) --- setup.py | 15 ++++++++++++--- sources/pyside2 | 2 +- sources/shiboken2 | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index f9451d840..7bb2d7af9 100644 --- a/setup.py +++ b/setup.py @@ -242,7 +242,11 @@ for n in ["pyside_package", "build", "PySide-%s" % __version__]: d = os.path.join(script_dir, n) if os.path.isdir(d): print("Removing %s" % d) - rmtree(d) + try: + rmtree(d) + except Exception as e: + print('***** problem removing "{}"'.format(d)) + print('ignored error: {}'.format(e)) # Prepare package folders for pkg in ["pyside_package/PySide", "pyside_package/pysideuic"]: @@ -556,9 +560,14 @@ class pyside_build(_build): return if os.path.exists(module_build_dir): log.info("Deleting module build folder %s..." % module_build_dir) - rmtree(module_build_dir) + try: + rmtree(module_build_dir) + except Exception as e: + print('***** problem removing "{}"'.format(module_build_dir)) + print('ignored error: {}'.format(e)) log.info("Creating module build folder %s..." % module_build_dir) - os.makedirs(module_build_dir) + if not os.path.exists(module_build_dir): + os.makedirs(module_build_dir) os.chdir(module_build_dir) module_src_dir = os.path.join(self.sources_dir, folder) diff --git a/sources/pyside2 b/sources/pyside2 index c5539eed9..b480da560 160000 --- a/sources/pyside2 +++ b/sources/pyside2 @@ -1 +1 @@ -Subproject commit c5539eed974e5a6ce7a55f69e88e9b477fafa99e +Subproject commit b480da5601c9725094080a900b2c82d986483982 diff --git a/sources/shiboken2 b/sources/shiboken2 index 70b88893e..28f1649a3 160000 --- a/sources/shiboken2 +++ b/sources/shiboken2 @@ -1 +1 @@ -Subproject commit 70b88893e95589dc5c42638e0dff1b408e1d1c32 +Subproject commit 28f1649a34d386966059b23d69ebd34433e593f5 -- cgit v1.2.3