From 2100da9dcdba7a8bc18f6180fd7e61640319b48a Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Sat, 6 Oct 2012 18:40:58 -0300 Subject: Ensure we ignore __pycache__ PEP 3174 dirs in a few more places. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 165c5e9f73..333d57ac70 100644 --- a/setup.py +++ b/setup.py @@ -67,9 +67,10 @@ if root_dir != '': django_dir = 'django' for dirpath, dirnames, filenames in os.walk(django_dir): - # Ignore dirnames that start with '.' + # Ignore PEP 3147 cache dirs and those whose names start with '.' for i, dirname in enumerate(dirnames): - if dirname.startswith('.'): del dirnames[i] + if dirname.startswith('.') or dirname == '__pycache__': + del dirnames[i] if '__init__.py' in filenames: packages.append('.'.join(fullsplit(dirpath))) elif filenames: -- cgit v1.3