From 605ef54cbe1f8475b3e0d45679a43cb2e454892a Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Tue, 9 Jan 2007 18:09:12 +0000 Subject: Don't double-upload .exe files under Python 2.5. :( (backport from trunk) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4053310 --- setuptools/command/bdist_wininst.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'setuptools/command/bdist_wininst.py') diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py index d2a8a4b1..0e06106a 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -2,24 +2,24 @@ from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst import os class bdist_wininst(_bdist_wininst): - - def create_exe(self, arcname, fullname, bitmap=None): - - _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 sys.version<'2.5': + def create_exe(self, arcname, fullname, bitmap=None): + + _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) + ) def reinitialize_command (self, command, reinit_subcommands=0): cmd = self.distribution.reinitialize_command( -- cgit v1.2.1