diff options
author | Barry Warsaw <barry@python.org> | 2010-04-26 15:59:03 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2010-04-26 15:59:03 (GMT) |
commit | c04317fdc45ded619a1b66941d1437a5e9a37a73 (patch) | |
tree | 4ad24fecd84e55ecfc977b544f27f9a71751f23e /Lib/compileall.py | |
parent | a1af3e0b9ee9ee150d0ddce1306ce1a7aadf2a03 (diff) | |
download | cpython-c04317fdc45ded619a1b66941d1437a5e9a37a73.zip cpython-c04317fdc45ded619a1b66941d1437a5e9a37a73.tar.gz cpython-c04317fdc45ded619a1b66941d1437a5e9a37a73.tar.bz2 |
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.
Diffstat (limited to 'Lib/compileall.py')
-rw-r--r-- | Lib/compileall.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/compileall.py b/Lib/compileall.py index d9d7816..be9e2ad 100644 --- a/Lib/compileall.py +++ b/Lib/compileall.py @@ -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) |