summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/distutils/command/bdist_wininst.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index 357ba51..9ff9461 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -112,13 +112,16 @@ class bdist_wininst (Command):
# And make an archive relative to the root of the
# pseudo-installation tree.
+ from tempfile import mktemp
+ archive_basename = mktemp()
fullname = self.distribution.get_fullname()
- archive_basename = os.path.join(self.bdist_dir,
- "%s.win32" % fullname)
-
arcname = self.make_archive(archive_basename, "zip",
root_dir=self.bdist_dir)
+ # create an exe containing the zip-file
self.create_exe(arcname, fullname, self.bitmap)
+ # remove the zip-file again
+ self.announce("removing temporary file '%s'" % arcname)
+ os.remove(arcname)
if not self.keep_temp:
remove_tree(self.bdist_dir, self.verbose, self.dry_run)