]> granicus.if.org Git - python/commitdiff
Fixed 'select_scheme()' so it doesn't override a directory attribute that's
authorGregory P. Smith <greg@mad-scientist.com>
Fri, 12 May 2000 01:54:50 +0000 (01:54 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Fri, 12 May 2000 01:54:50 +0000 (01:54 +0000)
already been set (eg. by a command-line option).

Lib/distutils/command/install.py

index 4e68e00e95f5f3740f108b06076b6e56f1ff5314..ba4110cb8aa189b7140f3fe1a1c25ae3d85e5baf 100644 (file)
@@ -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):