Fix filtering during collection of paths in setup.py

Thanks Marek Brzóska for the report.
This commit is contained in:
Ramiro Morales 2013-02-14 20:29:21 -03:00
parent 668d0b8d49
commit f179a5198e
1 changed files with 1 additions and 3 deletions

View File

@ -68,9 +68,7 @@ django_dir = 'django'
for dirpath, dirnames, filenames in os.walk(django_dir): for dirpath, dirnames, filenames in os.walk(django_dir):
# Ignore PEP 3147 cache dirs and those whose names start with '.' # Ignore PEP 3147 cache dirs and those whose names start with '.'
for i, dirname in enumerate(dirnames): dirnames[:] = [d for d in dirnames if not d.startswith('.') and d != '__pycache__']
if dirname.startswith('.') or dirname == '__pycache__':
del dirnames[i]
if '__init__.py' in filenames: if '__init__.py' in filenames:
packages.append('.'.join(fullsplit(dirpath))) packages.append('.'.join(fullsplit(dirpath)))
elif filenames: elif filenames: