summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2000-05-12 01:54:50 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2000-05-12 01:54:50 (GMT)
commit17f641c1439585d10a7d03cd22067e2dd0db3ccf (patch)
tree7822e740b396f5dd23ac3989f141ba4e331d10e6
parent74ead8ff5d0861e7adb4eca185a1f0beb1a54227 (diff)
downloadcpython-17f641c1439585d10a7d03cd22067e2dd0db3ccf.zip
cpython-17f641c1439585d10a7d03cd22067e2dd0db3ccf.tar.gz
cpython-17f641c1439585d10a7d03cd22067e2dd0db3ccf.tar.bz2
Fixed 'select_scheme()' so it doesn't override a directory attribute that's
already been set (eg. by a command-line option).
-rw-r--r--Lib/distutils/command/install.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 4e68e00..ba4110c 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):