From 3f14d160421187a37ccfb91f1e7fce6d54378cb6 Mon Sep 17 00:00:00 2001 From: PJ Eby Date: Fri, 29 Dec 2006 00:59:37 +0000 Subject: Work around a distutils bdist_wininst bug: if the user has specified an --install-lib via a configuration file, the path is hardcoded into the .exe file in place of PLATLIB/ or PURELIB/. (Backport from trunk.) --HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4053184 --- setuptools/command/__init__.py | 1 - setuptools/command/bdist_wininst.py | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'setuptools') diff --git a/setuptools/command/__init__.py b/setuptools/command/__init__.py index 454b4a9f..f898822b 100644 --- a/setuptools/command/__init__.py +++ b/setuptools/command/__init__.py @@ -9,7 +9,6 @@ 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 index e0e5cfb2..9881f3b1 100755 --- a/setuptools/command/bdist_wininst.py +++ b/setuptools/command/bdist_wininst.py @@ -20,3 +20,11 @@ class bdist_wininst(_bdist_wininst): getattr(self.distribution,'dist_files',[]).append( ('bdist_wininst', pyversion, installer_name) ) + + 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 + -- cgit v1.2.3