From 1c086df50e76f1fd84e0d90bfb1d0b13468ba13b Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Thu, 14 Feb 2013 20:29:21 -0300 Subject: [PATCH] [1.5.x] Fix filtering during collection of paths in setup.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks Marek Brzóska for the report. f179a5198e05e1be8ba8be87c1f0e1a8924cf005 from master. --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 3917ca7f37..a904aea693 100644 --- a/setup.py +++ b/setup.py @@ -68,9 +68,7 @@ django_dir = 'django' for dirpath, dirnames, filenames in os.walk(django_dir): # Ignore PEP 3147 cache dirs and those whose names start with '.' - for i, dirname in enumerate(dirnames): - if dirname.startswith('.') or dirname == '__pycache__': - del dirnames[i] + dirnames[:] = [d for d in dirnames if not d.startswith('.') and d != '__pycache__'] if '__init__.py' in filenames: packages.append('.'.join(fullsplit(dirpath))) elif filenames: