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).
This commit is contained in:
Greg Ward 2000-09-15 01:20:10 +00:00
parent d602909128
commit 9bd3e9b6b2
1 changed files with 6 additions and 3 deletions

View File

@ -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 ()