Commit 69ccd0aa authored by PJ Eby's avatar PJ Eby

Fix bdist_wininst files not being uploaded by "upload"

(backport from trunk)

--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4051964
parent 70c294c9
......@@ -2564,8 +2564,8 @@ Release Notes/Change History
----------------------------
0.6c4
* Fix ``upload`` not uploading files built by ``bdist_rpm`` on Python 2.3 and
2.4.
* Fix ``upload`` command not uploading files built by ``bdist_rpm`` or
``bdist_wininst`` under Python 2.3 and 2.4.
0.6c3
* Fixed breakages caused by Subversion 1.4's new "working copy" format
......
......@@ -2,13 +2,14 @@ __all__ = [
'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop',
'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts',
'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts',
'register',
'register', 'bdist_wininst',
]
import sys
if sys.version>='2.5':
# In Python 2.5 and above, distutils includes its own upload command
__all__.remove('upload')
__all__.remove('bdist_wininst') # this is only for 'upload' support
from distutils.command.bdist import bdist
......
from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst
import sys
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)
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment