diff options
author | Greg Ward <gward@python.net> | 2000-09-15 01:20:10 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-09-15 01:20:10 (GMT) |
commit | 9bd3e9b6b260ac249024c426ec62133e05919f10 (patch) | |
tree | 7df8fda47251aafcb06198d0c6dbb85b0b369103 | |
parent | d60290912884c0ddf37fc42e46ed712e9f2ced37 (diff) | |
download | cpython-9bd3e9b6b260ac249024c426ec62133e05919f10.zip cpython-9bd3e9b6b260ac249024c426ec62133e05919f10.tar.gz cpython-9bd3e9b6b260ac249024c426ec62133e05919f10.tar.bz2 |
Adjust to the new sysconfig regime: use 'get_config_vars()' instead
of globals from sysconfig.
Added 'prefix' and 'exec_prefix' to the list of variables that can be
expanded in installation directories (preserving the stupid old names
of 'sys_prefix' and 'sys_exec_prefix, though).
-rw-r--r-- | Lib/distutils/command/install.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index 2332770..938922a 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -9,7 +9,7 @@ __revision__ = "$Id$" import sys, os, string from types import * from distutils.core import Command, DEBUG -from distutils import sysconfig +from distutils.sysconfig import get_config_vars from distutils.file_util import write_file from distutils.util import convert_path, subst_vars, change_root from distutils.errors import DistutilsOptionError @@ -226,13 +226,16 @@ class install (Command): # about needing recursive variable expansion (shudder). py_version = (string.split(sys.version))[0] + prefix = get_config_vars('prefix', 'exec_prefix') self.config_vars = {'dist_name': self.distribution.get_name(), 'dist_version': self.distribution.get_version(), 'dist_fullname': self.distribution.get_fullname(), 'py_version': py_version, 'py_version_short': py_version[0:3], - 'sys_prefix': sysconfig.PREFIX, - 'sys_exec_prefix': sysconfig.EXEC_PREFIX, + 'sys_prefix': prefix, + 'prefix': prefix, + 'sys_exec_prefix': exec_prefix, + 'exec_prefix': exec_prefix, } self.expand_basedirs () |