aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools.txt4
-rw-r--r--setuptools/command/__init__.py3
-rwxr-xr-xsetuptools/command/bdist_wininst.py22
3 files changed, 26 insertions, 3 deletions
diff --git a/setuptools.txt b/setuptools.txt
index 62d20e86..43e0e610 100755
--- a/setuptools.txt
+++ b/setuptools.txt
@@ -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
diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py
index 0689b788..454b4a9f 100644
--- a/setuptools/command/__init__.py
+++ b/setuptools/command/__init__.py
@@ -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
diff --git a/setuptools/command/bdist_wininst.py b/setuptools/command/bdist_wininst.py
new file mode 100755
index 00000000..b2fea0dd
--- /dev/null
+++ b/setuptools/command/bdist_wininst.py
@@ -0,0 +1,22 @@
+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)
+ )