From 9bd3e9b6b260ac249024c426ec62133e05919f10 Mon Sep 17 00:00:00 2001 From: Greg Ward Date: Fri, 15 Sep 2000 01:20:10 +0000 Subject: 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). --- Lib/distutils/command/install.py | 9 ++++++--- 1 file 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 () -- cgit v0.12