From 4c4cb7a58b8d19e0aa5837c8e5de36e9519be033 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Fri, 28 Mar 2014 20:17:24 +0100 Subject: [PATCH] FIX: make python setup.py clean also delete __pycache__ folders --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b50a0c85dea6c..9ffd06c2dcd48 100755 --- a/setup.py +++ b/setup.py @@ -69,7 +69,9 @@ def run(self): or filename.endswith('.dll') or filename.endswith('.pyc')): os.unlink(os.path.join(dirpath, filename)) - + for dirname in dirnames: + if dirname == '__pycache__': + shutil.rmtree(os.path.join(dirpath, dirname)) ###############################################################################