mirror of
https://github.com/django/django.git
synced 2025-10-09 18:12:39 +00:00
Ensure we ignore __pycache__ PEP 3174 dirs in a few more places.
This commit is contained in:
parent
69035b0b1c
commit
2100da9dcd
5 changed files with 8 additions and 5 deletions
5
setup.py
5
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue