Commits

Vinay Sajip committed ff44bba

Updated constant names for prefixes for consistency with actual usage.

  • Participants
  • Parent commits c2b3dee
  • Branches base_prefix

Comments (0)

Files changed (2)

File Lib/distutils/sysconfig.py

 # in test_importhooks.
 # It needs to be investigated as to why this failure only seems to
 # happen on OS X, but for now we've resorted to getattr(sys, 'site_xxx', sys.xxx)
-SITE_PREFIX = os.path.normpath(sys.prefix)
-SITE_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-PREFIX = os.path.normpath(sys.base_prefix)
-EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+PREFIX = os.path.normpath(sys.prefix)
+EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+BASE_PREFIX = os.path.normpath(sys.base_prefix)
+BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
 
 # Path to the base directory of the project. On Windows the binary may
 # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
     sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
     """
     if prefix is None:
-        prefix = plat_specific and EXEC_PREFIX or PREFIX
+        prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
     if os.name == "posix":
         if python_build:
             # Assume the executable is in the build directory.  The
     """
     if prefix is None:
         if standard_lib:
+            prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
+        else:
             prefix = plat_specific and EXEC_PREFIX or PREFIX
-        else:
-            prefix = plat_specific and SITE_EXEC_PREFIX or SITE_PREFIX
 
     if os.name == "posix":
         libpython = os.path.join(prefix,
         # Normalized versions of prefix and exec_prefix are handy to have;
         # in fact, these are the standard versions used most places in the
         # Distutils.
-        _config_vars['prefix'] = SITE_PREFIX
-        _config_vars['exec_prefix'] = SITE_EXEC_PREFIX
+        _config_vars['prefix'] = PREFIX
+        _config_vars['exec_prefix'] = EXEC_PREFIX
 
         # Convert srcdir into an absolute path if it appears necessary.
         # Normally it is relative to the build directory.  However, during

File Lib/sysconfig.py

 
 _expand_globals(_SCHEMES)
 
- # FIXME don't rely on sys.version here, its format is an implementatin detail
+ # FIXME don't rely on sys.version here, its format is an implementation detail
  # of CPython, use sys.version_info or sys.hexversion
 _PY_VERSION = sys.version.split()[0]
 _PY_VERSION_SHORT = sys.version[:3]
 _PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
-_SITE_PREFIX = os.path.normpath(sys.prefix)
-_PREFIX = os.path.normpath(sys.base_prefix)
-_SITE_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+_PREFIX = os.path.normpath(sys.prefix)
+_BASE_PREFIX = os.path.normpath(sys.base_prefix)
+_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+_BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
 _CONFIG_VARS = None
 _USER_BASE = None
 
         # Normalized versions of prefix and exec_prefix are handy to have;
         # in fact, these are the standard versions used most places in the
         # packaging module.
-        _CONFIG_VARS['prefix'] = _SITE_PREFIX
-        _CONFIG_VARS['exec_prefix'] = _SITE_EXEC_PREFIX
+        _CONFIG_VARS['prefix'] = _PREFIX
+        _CONFIG_VARS['exec_prefix'] = _EXEC_PREFIX
         _CONFIG_VARS['py_version'] = _PY_VERSION
         _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
         _CONFIG_VARS['py_version_nodot'] = _PY_VERSION[0] + _PY_VERSION[2]
-        _CONFIG_VARS['installed_base'] = _PREFIX
-        _CONFIG_VARS['base'] = _SITE_PREFIX
-        _CONFIG_VARS['installed_platbase'] = _EXEC_PREFIX
-        _CONFIG_VARS['platbase'] = _SITE_EXEC_PREFIX
+        _CONFIG_VARS['installed_base'] = _BASE_PREFIX
+        _CONFIG_VARS['base'] = _PREFIX
+        _CONFIG_VARS['installed_platbase'] = _BASE_EXEC_PREFIX
+        _CONFIG_VARS['platbase'] = _EXEC_PREFIX
         _CONFIG_VARS['projectbase'] = _PROJECT_BASE
         try:
             _CONFIG_VARS['abiflags'] = sys.abiflags