diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2010-12-29 21:39:18 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2010-12-29 21:39:18 +0000 |
commit | ebcd492d39cd0525b768a48558e50041aa0961e3 (patch) | |
tree | aef06d0d3e3b658801d1e64b260aa1831ceeb271 /lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/setuptools/command/bdist_wininst.py | |
parent | edb96c300a560f35ed8f8d6dd87d3159e1edbbe2 (diff) |
Revert "Dammit."
This reverts commit acf8c73de7e478804b5273fbdd2e7225f7976af9.
Diffstat (limited to 'lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/setuptools/command/bdist_wininst.py')
-rwxr-xr-x | lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/setuptools/command/bdist_wininst.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/setuptools/command/bdist_wininst.py b/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/setuptools/command/bdist_wininst.py new file mode 100755 index 00000000..93e6846d --- /dev/null +++ b/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg/setuptools/command/bdist_wininst.py @@ -0,0 +1,41 @@ +from distutils.command.bdist_wininst import bdist_wininst as _bdist_wininst +import os, sys + +class bdist_wininst(_bdist_wininst): + + def create_exe(self, arcname, fullname, bitmap=None): + _bdist_wininst.create_exe(self, arcname, fullname, bitmap) + dist_files = getattr(self.distribution, 'dist_files', []) + + 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 + + # fix 2.5 bdist_wininst ignoring --target-version spec + bad = ('bdist_wininst','any',installer_name) + if bad in dist_files: + dist_files.remove(bad) + else: + installer_name = os.path.join(self.dist_dir, + "%s.win32.exe" % fullname) + pyversion = 'any' + good = ('bdist_wininst', pyversion, installer_name) + if good not in dist_files: + dist_files.append(good) + + def reinitialize_command (self, command, reinit_subcommands=0): + cmd = self.distribution.reinitialize_command( + command, reinit_subcommands) + if command in ('install', 'install_lib'): + cmd.install_lib = None # work around distutils bug + return cmd + + def run(self): + self._is_running = True + try: + _bdist_wininst.run(self) + finally: + self._is_running = False + |