diff options
Diffstat (limited to 'setuptools')
-rw-r--r-- | setuptools/command/__init__.py | 3 | ||||
-rwxr-xr-x | setuptools/command/bdist_wininst.py | 22 |
2 files changed, 24 insertions, 1 deletions
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) + ) |