python/lib/moresetuptools.py: cleaner clean
authorPaul Brossier <piem@piem.org>
Mon, 28 Nov 2016 17:12:37 +0000 (18:12 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 28 Nov 2016 17:12:37 +0000 (18:12 +0100)
python/lib/moresetuptools.py

index 08f4592..1238091 100644 (file)
@@ -124,7 +124,9 @@ def add_system_aubio(ext):
 
 class CleanGenerated(distutils.command.clean.clean):
     def run(self):
-        distutils.dir_util.remove_tree(output_path)
+        if os.path.isdir(output_path):
+            distutils.dir_util.remove_tree(output_path)
+        config = os.path.join('python', 'ext', 'config.h')
         distutils.command.clean.clean.run(self)
 
 from distutils.command.build_ext import build_ext as _build_ext