summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck2
-rwxr-xr-xsetup.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/check b/check
index 708ac0f8..965d507a 100755
--- a/check
+++ b/check
@@ -20,5 +20,5 @@ set -e
python setup.py --quiet clean
python setup.py --quiet build_ext -i
-rm -rf build
+rm -rf build/*/
python setup.py --quiet check "$@"
diff --git a/setup.py b/setup.py
index 47f87660..a913274b 100755
--- a/setup.py
+++ b/setup.py
@@ -115,7 +115,11 @@ class CleanMore(clean):
self.remove_pyc('obnamlib')
self.remove_pyc('test-plugins')
if os.path.isdir('build'):
- shutil.rmtree('build')
+ if os.path.islink('build'):
+ for path in os.listdir('build'):
+ shutil.rmtree('build/' + path)
+ else:
+ shutil.rmtree('build')
def remove_pyc(self, rootdir):
for dirname, subdirs, basenames in os.walk(rootdir):