]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Revert the previous checkin - it didn't work anyway.
authorThomas Heller <theller@ctypes.org>
Tue, 15 Oct 2002 14:51:58 +0000 (14:51 +0000)
committerThomas Heller <theller@ctypes.org>
Tue, 15 Oct 2002 14:51:58 +0000 (14:51 +0000)
Lib/distutils/command/bdist_wininst.py

index b5383198813bdabd2ca2ba6a962a3cb2159958bf..71e51bfd379a8adb3abdd7aa033ad1b9c85f89ed 100644 (file)
@@ -130,9 +130,8 @@ class bdist_wininst (Command):
 
         # And make an archive relative to the root of the
         # pseudo-installation tree.
-        from tempfile import NamedTemporaryFile
-        arc = NamedTemporaryFile(".zip")
-        archive_basename = arc.name[:-4]
+        from tempfile import mktemp
+        archive_basename = mktemp()
         fullname = self.distribution.get_fullname()
         arcname = self.make_archive(archive_basename, "zip",
                                     root_dir=self.bdist_dir)
@@ -140,7 +139,7 @@ class bdist_wininst (Command):
         self.create_exe(arcname, fullname, self.bitmap)
         # remove the zip-file again
         log.debug("removing temporary file '%s'", arcname)
-        arc.close()
+        os.remove(arcname)
 
         if not self.keep_temp:
             remove_tree(self.bdist_dir, dry_run=self.dry_run)