Commit 9bd3e9b6 authored by Greg Ward's avatar Greg Ward

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).
parent d6029091
...@@ -9,7 +9,7 @@ __revision__ = "$Id$" ...@@ -9,7 +9,7 @@ __revision__ = "$Id$"
import sys, os, string import sys, os, string
from types import * from types import *
from distutils.core import Command, DEBUG 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.file_util import write_file
from distutils.util import convert_path, subst_vars, change_root from distutils.util import convert_path, subst_vars, change_root
from distutils.errors import DistutilsOptionError from distutils.errors import DistutilsOptionError
...@@ -226,13 +226,16 @@ class install (Command): ...@@ -226,13 +226,16 @@ class install (Command):
# about needing recursive variable expansion (shudder). # about needing recursive variable expansion (shudder).
py_version = (string.split(sys.version))[0] py_version = (string.split(sys.version))[0]
prefix = get_config_vars('prefix', 'exec_prefix')
self.config_vars = {'dist_name': self.distribution.get_name(), self.config_vars = {'dist_name': self.distribution.get_name(),
'dist_version': self.distribution.get_version(), 'dist_version': self.distribution.get_version(),
'dist_fullname': self.distribution.get_fullname(), 'dist_fullname': self.distribution.get_fullname(),
'py_version': py_version, 'py_version': py_version,
'py_version_short': py_version[0:3], 'py_version_short': py_version[0:3],
'sys_prefix': sysconfig.PREFIX, 'sys_prefix': prefix,
'sys_exec_prefix': sysconfig.EXEC_PREFIX, 'prefix': prefix,
'sys_exec_prefix': exec_prefix,
'exec_prefix': exec_prefix,
} }
self.expand_basedirs () self.expand_basedirs ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment