[Python-checkins] r53309 - sandbox/trunk/setuptools/setuptools/command/bdist_wininst.py

phillip.eby python-checkins at python.org
Tue Jan 9 19:08:31 CET 2007


Author: phillip.eby
Date: Tue Jan  9 19:08:31 2007
New Revision: 53309

Modified:
   sandbox/trunk/setuptools/setuptools/command/bdist_wininst.py
Log:
Don't double-upload .exe files under Python 2.5.  :(


Modified: sandbox/trunk/setuptools/setuptools/command/bdist_wininst.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/bdist_wininst.py	(original)
+++ sandbox/trunk/setuptools/setuptools/command/bdist_wininst.py	Tue Jan  9 19:08:31 2007
@@ -2,24 +2,24 @@
 import os
 
 class bdist_wininst(_bdist_wininst):
+    if sys.version<'2.5':
+        def create_exe(self, arcname, fullname, bitmap=None):
 
-    def create_exe(self, arcname, fullname, bitmap=None):
+            _bdist_wininst.create_exe(self, arcname, fullname, bitmap)
 
-        _bdist_wininst.create_exe(self, arcname, fullname, bitmap)
-
-        if self.target_version:
-            installer_name = os.path.join(self.dist_dir,
-                                          "%s.win32-py%s.exe" %
-                                           (fullname, self.target_version))
-            pyversion = self.target_version
-        else:
-            installer_name = os.path.join(self.dist_dir,
-                                          "%s.win32.exe" % fullname)
-            pyversion = 'any'
-
-        getattr(self.distribution,'dist_files',[]).append(
-            ('bdist_wininst', pyversion, installer_name)
-        )
+            if self.target_version:
+                installer_name = os.path.join(self.dist_dir,
+                                              "%s.win32-py%s.exe" %
+                                               (fullname, self.target_version))
+                pyversion = self.target_version
+            else:
+                installer_name = os.path.join(self.dist_dir,
+                                              "%s.win32.exe" % fullname)
+                pyversion = 'any'
+
+            getattr(self.distribution,'dist_files',[]).append(
+                ('bdist_wininst', pyversion, installer_name)
+            )
 
     def reinitialize_command (self, command, reinit_subcommands=0):
         cmd = self.distribution.reinitialize_command(


More information about the Python-checkins mailing list