summaryrefslogtreecommitdiff
path: root/setuptools/command/easy_install.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-01-26 22:08:07 +0000
committerPJ Eby <distutils-sig@python.org>2006-01-26 22:08:07 +0000
commitbfe2e002ddc09e0c96267733940a5c1d2ae89ef3 (patch)
tree6328e5fee84223ab04599bef3ac8e47b53fed8f1 /setuptools/command/easy_install.py
parentf6235b239c8327962c0025ec607541a6648d53a8 (diff)
downloadpython-setuptools-git-bfe2e002ddc09e0c96267733940a5c1d2ae89ef3.tar.gz
Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``,
``--install-dir``, and ``--script-dir`` options, whether on the command line or in configuration files. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042191
Diffstat (limited to 'setuptools/command/easy_install.py')
-rwxr-xr-xsetuptools/command/easy_install.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index a64997f7..e6777011 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -122,6 +122,7 @@ class easy_install(Command):
os.unlink(filename)
def finalize_options(self):
+ self._expand('install_dir','script_dir','build_directory','site_dirs')
# If a non-default installation directory was specified, default the
# script directory to match it.
if self.script_dir is None:
@@ -154,7 +155,6 @@ class easy_install(Command):
)
else:
self.all_site_dirs.append(normalize_path(d))
-
instdir = normalize_path(self.install_dir or self.all_site_dirs[-1])
if instdir in self.all_site_dirs:
if self.pth_file is None:
@@ -887,15 +887,15 @@ See the setuptools documentation for the "develop" command for more info.
finally:
log.set_verbosity(self.verbose) # restore original verbosity
-
-
-
-
-
-
-
-
-
+ def _expand(self, *attrs):
+ config_vars = self.get_finalized_command('install').config_vars
+ for attr in attrs:
+ val = getattr(self, attr)
+ if val is not None:
+ if os.name == 'posix':
+ val = os.path.expanduser(val)
+ val = subst_vars(val, config_vars)
+ setattr(self, attr, val)