From f28383206a2467e1d5235cf7530a033c9eaaaa60 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 23 Jun 2019 17:08:40 +0200 Subject: [PATCH] Delete *.dSYM directories when cleaning --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bc5c3ae251..13afc71171 100755 --- a/setup.py +++ b/setup.py @@ -793,7 +793,7 @@ def safe_remove(*entries): exclude = ('.git',) for root, dirs, files in os.walk('.', topdown=True): dirs[:] = [d for d in dirs if d not in exclude] - remove_dirs = {d for d in dirs if d == '__pycache__'} + remove_dirs = {d for d in dirs if d == '__pycache__' or d.endswith('.dSYM')} [(shutil.rmtree(os.path.join(root, d)), dirs.remove(d)) for d in remove_dirs] for f in files: ext = f.rpartition('.')[-1]