summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-01-26 17:23:20 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-01-26 17:23:20 (GMT)
commit0302cf50ebbaf3da5d5358bdfb5f61babb3f1c6f (patch)
tree39c3dcb2ab7676e4a4eae2b66c0cf3e6bf0a453d /Lib/distutils/command
parent26dd760636840f85f08e52ca7b63ab05d9161e43 (diff)
downloadcpython-0302cf50ebbaf3da5d5358bdfb5f61babb3f1c6f.zip
cpython-0302cf50ebbaf3da5d5358bdfb5f61babb3f1c6f.tar.gz
cpython-0302cf50ebbaf3da5d5358bdfb5f61babb3f1c6f.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 96fb7fa..054fe19 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -428,6 +428,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)