From aaedcef5786f10593b51d389423b5d7ce97727c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarek=20Ziad=C3=A9?= Date: Sun, 25 Jan 2009 23:34:00 +0000 Subject: Fixed #1885: --formats=tar,gztar was not working properly in the sdist command --- Lib/distutils/command/sdist.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Lib/distutils/command/sdist.py') diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py index 6ce8c43ddc..e8b6bce9c9 100644 --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -456,6 +456,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) -- cgit v1.2.1