Merged revisions 81371 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81371 | tarek.ziade | 2010-05-20 00:20:14 +0200 (Thu, 20 May 2010) | 1 line

  #8759: Fixed user paths in sysconfig for posix and os2 schemes
........
This commit is contained in:
Tarek Ziadé 2010-05-19 22:25:00 +00:00
parent 45cceeb608
commit 06710a8421
3 changed files with 20 additions and 9 deletions

View File

@ -47,10 +47,10 @@ _INSTALL_SCHEMES = {
'data' : '{base}',
},
'os2_home': {
'stdlib': '{userbase}/lib/python/{py_version_short}',
'platstdlib': '{userbase}/lib/python/{py_version_short}',
'purelib': '{userbase}/lib/python/{py_version_short}/site-packages',
'platlib': '{userbase}/lib/python/{py_version_short}/site-packages',
'stdlib': '{userbase}/lib/python{py_version_short}',
'platstdlib': '{userbase}/lib/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
'data' : '{userbase}',
},
'posix_user': {
'stdlib': '{userbase}/lib/python/{py_version_short}',
'platstdlib': '{userbase}/lib/python/{py_version_short}',
'purelib': '{userbase}/lib/python/{py_version_short}/site-packages',
'platlib': '{userbase}/lib/python/{py_version_short}/site-packages',
'stdlib': '{userbase}/lib/python{py_version_short}',
'platstdlib': '{userbase}/lib/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',

View File

@ -17,7 +17,7 @@ import sysconfig
from sysconfig import (get_paths, get_platform, get_config_vars,
get_path, get_path_names, _INSTALL_SCHEMES,
_get_default_scheme, _expand_vars,
get_scheme_names)
get_scheme_names, get_config_var)
class TestSysConfig(unittest.TestCase):
@ -254,6 +254,15 @@ class TestSysConfig(unittest.TestCase):
finally:
unlink(link)
def test_user_similar(self):
# Issue 8759 : make sure the posix scheme for the users
# is similar to the global posix_prefix one
base = get_config_var('base')
user = get_config_var('userbase')
for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
global_path = get_path(name, 'posix_prefix')
user_path = get_path(name, 'posix_user')
self.assertEquals(user_path, global_path.replace(base, user))
def test_main():
run_unittest(TestSysConfig)

View File

@ -375,6 +375,8 @@ C-API
Library
-------
- Issue #8759: Fixed user paths in sysconfig for posix and os2 schemes.
- Issue #8663: distutils.log emulates backslashreplace error handler. Fix
compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if
stdout is not a TTY).