[Python-checkins] release: kill all pycs with prejudice (#20316)
benjamin.peterson
python-checkins at python.org
Mon Jan 20 20:45:52 CET 2014
http://hg.python.org/release/rev/9272f4fd7689
changeset: 68:9272f4fd7689
user: Benjamin Peterson <benjamin at python.org>
date: Mon Jan 20 14:45:47 2014 -0500
summary:
kill all pycs with prejudice (#20316)
files:
release.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/release.py b/release.py
--- a/release.py
+++ b/release.py
@@ -272,7 +272,7 @@
# Remove files we don't want to ship in tarballs.
print('Removing VCS .*ignore, .hg*, and the hgtouch.pyc we JUST CREATED')
for name in ('.hgignore', '.hgeol', '.hgtags', '.hgtouch',
- '.bzrignore', '.gitignore', 'Tools/hg/hgtouch.pyc'):
+ '.bzrignore', '.gitignore'):
try:
os.unlink(name)
except OSError:
@@ -291,10 +291,11 @@
shutil.rmtree('tools/jinja2', ignore_errors=True)
shutil.rmtree('tools/pygments', ignore_errors=True)
shutil.rmtree('tools/sphinx', ignore_errors=True)
- for dirpath, dirnames, filenames in os.walk('.'):
- for filename in filenames:
- if filename.endswith('.pyc'):
- os.remove(os.path.join(dirpath, filename))
+
+ with changed_dir(archivename):
+ print('Zapping pycs')
+ run_cmd(["find . -depth -name '__pycache__' -exec rm -rf {} ';'"])
+ run_cmd(["find . -name '*.py[co]' -exec rm -f {} ';'"])
os.mkdir('src')
with changed_dir('src'):
--
Repository URL: http://hg.python.org/release
More information about the Python-checkins
mailing list