From: Gregory P. Smith Date: Fri, 12 May 2000 01:54:50 +0000 (+0000) Subject: Fixed 'select_scheme()' so it doesn't override a directory attribute that's X-Git-Tag: v2.0b1~1750 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17f641c1439585d10a7d03cd22067e2dd0db3ccf;p=thirdparty%2FPython%2Fcpython.git Fixed 'select_scheme()' so it doesn't override a directory attribute that's already been set (eg. by a command-line option). --- diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 4e68e00e95f5..ba4110cb8aa1 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -356,7 +356,9 @@ class install (Command): # it's the caller's problem if they supply a bad name! scheme = INSTALL_SCHEMES[name] for key in ('purelib', 'platlib', 'scripts', 'data'): - setattr (self, 'install_' + key, scheme[key]) + attrname = 'install_' + key + if getattr(self, attrname) is None: + setattr(self, attrname, scheme[key]) def _expand_attrs (self, attrs):