summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-01-26 17:20:15 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-01-26 17:20:15 (GMT)
commitf66326f8bd182659a31f3e762efb47cdfd24b588 (patch)
treee444bb64bdfb043a946942ac55bb102a141b3fe2 /Lib/distutils/command
parent8fb67e038e7888c4e147b384a370c2817a428d16 (diff)
downloadcpython-f66326f8bd182659a31f3e762efb47cdfd24b588.zip
cpython-f66326f8bd182659a31f3e762efb47cdfd24b588.tar.gz
cpython-f66326f8bd182659a31f3e762efb47cdfd24b588.tar.bz2
Merged revisions 68951 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68951 | tarek.ziade | 2009-01-26 00:34:00 +0100 (Mon, 26 Jan 2009) | 1 line Fixed #1885: --formats=tar,gztar was not working properly in the sdist command ........
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/sdist.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 27883fd6..a366d1e 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -458,6 +458,10 @@ class sdist (Command):
self.make_release_tree(base_dir, self.filelist.files)
archive_files = [] # remember names of files we create
+ # tar archive must be created last to avoid overwrite and remove
+ if 'tar' in self.formats:
+ self.formats.append(self.formats.pop(self.formats.index('tar')))
+
for fmt in self.formats:
file = self.make_archive(base_name, fmt, base_dir=base_dir)
archive_files.append(file)