mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Bug 8527 - multiple compileall calls produce cascading __pycache__ directories.
* Patch contributed by Arfrever Frehtes Taifersar Arahesis. * Test added by Barry Also, improve Makefile's deletion of __pycache__ directories so e.g. 'make distclean' doesn't fail if no __pycache__ directories exist.
This commit is contained in:
parent
a1af3e0b9e
commit
c04317fdc4
3 changed files with 21 additions and 1 deletions
|
@ -45,6 +45,8 @@ def compile_dir(dir, maxlevels=10, ddir=None,
|
|||
names.sort()
|
||||
success = 1
|
||||
for name in names:
|
||||
if name == '__pycache__':
|
||||
continue
|
||||
fullname = os.path.join(dir, name)
|
||||
if ddir is not None:
|
||||
dfile = os.path.join(ddir, name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue