diff options
| author | PJ Eby <distutils-sig@python.org> | 2006-01-26 22:08:07 +0000 |
|---|---|---|
| committer | PJ Eby <distutils-sig@python.org> | 2006-01-26 22:08:07 +0000 |
| commit | bfe2e002ddc09e0c96267733940a5c1d2ae89ef3 (patch) | |
| tree | 6328e5fee84223ab04599bef3ac8e47b53fed8f1 | |
| parent | f6235b239c8327962c0025ec607541a6648d53a8 (diff) | |
| download | python-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
| -rwxr-xr-x | EasyInstall.txt | 8 | ||||
| -rwxr-xr-x | setuptools/command/easy_install.py | 20 |
2 files changed, 17 insertions, 11 deletions
diff --git a/EasyInstall.txt b/EasyInstall.txt index 82c8bb52..eb5925f4 100755 --- a/EasyInstall.txt +++ b/EasyInstall.txt @@ -963,6 +963,13 @@ Known Issues time out or be missing a file. 0.6a10 + * Expand ``$variables`` used in the ``--site-dirs``, ``--build-directory``, + ``--install-dir``, and ``--script-dir`` options, whether on the command line + or in configuration files. + + * Improved SourceForge mirror processing to work faster and be less affected + by transient HTML changes made by SourceForge. + * PyPI searches now use the exact spelling of requirements specified on the command line or in a project's ``install_requires``. Previously, a normalized form of the name was used, which could lead to unnecessary @@ -976,7 +983,6 @@ Known Issues page). 0.6a9 - * Fixed ``.pth`` file processing picking up nested eggs (i.e. ones inside "baskets") when they weren't explicitly listed in the ``.pth`` file. 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) |
