summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index f4545b6a0c..6fff26d3af 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: