File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,17 +130,16 @@ def run (self):
130130
131131 # And make an archive relative to the root of the
132132 # pseudo-installation tree.
133- from tempfile import NamedTemporaryFile
134- arc = NamedTemporaryFile (".zip" )
135- archive_basename = arc .name [:- 4 ]
133+ from tempfile import mktemp
134+ archive_basename = mktemp ()
136135 fullname = self .distribution .get_fullname ()
137136 arcname = self .make_archive (archive_basename , "zip" ,
138137 root_dir = self .bdist_dir )
139138 # create an exe containing the zip-file
140139 self .create_exe (arcname , fullname , self .bitmap )
141140 # remove the zip-file again
142141 log .debug ("removing temporary file '%s'" , arcname )
143- arc . close ( )
142+ os . remove ( arcname )
144143
145144 if not self .keep_temp :
146145 remove_tree (self .bdist_dir , dry_run = self .dry_run )
You can’t perform that action at this time.
0 commit comments