Delete *.dSYM directories when cleaning

This commit is contained in:
Luflosi 2019-06-23 17:08:40 +02:00
parent ba1c093d18
commit f28383206a
No known key found for this signature in database
GPG Key ID: 14140F703B7D8362

View File

@ -793,7 +793,7 @@ def clean():
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]