Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06710a8

Browse files
author
Tarek Ziadé
committed
Merged revisions 81371 via svnmerge from
svn+ssh://[email protected]/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 ........
1 parent 45cceeb commit 06710a8

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

Lib/sysconfig.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
'data' : '{base}',
4848
},
4949
'os2_home': {
50-
'stdlib': '{userbase}/lib/python/{py_version_short}',
51-
'platstdlib': '{userbase}/lib/python/{py_version_short}',
52-
'purelib': '{userbase}/lib/python/{py_version_short}/site-packages',
53-
'platlib': '{userbase}/lib/python/{py_version_short}/site-packages',
50+
'stdlib': '{userbase}/lib/python{py_version_short}',
51+
'platstdlib': '{userbase}/lib/python{py_version_short}',
52+
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
53+
'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
5454
'include': '{userbase}/include/python{py_version_short}',
5555
'scripts': '{userbase}/bin',
5656
'data' : '{userbase}',
@@ -65,10 +65,10 @@
6565
'data' : '{userbase}',
6666
},
6767
'posix_user': {
68-
'stdlib': '{userbase}/lib/python/{py_version_short}',
69-
'platstdlib': '{userbase}/lib/python/{py_version_short}',
70-
'purelib': '{userbase}/lib/python/{py_version_short}/site-packages',
71-
'platlib': '{userbase}/lib/python/{py_version_short}/site-packages',
68+
'stdlib': '{userbase}/lib/python{py_version_short}',
69+
'platstdlib': '{userbase}/lib/python{py_version_short}',
70+
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
71+
'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
7272
'include': '{userbase}/include/python{py_version_short}',
7373
'scripts': '{userbase}/bin',
7474
'data' : '{userbase}',

Lib/test/test_sysconfig.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from sysconfig import (get_paths, get_platform, get_config_vars,
1818
get_path, get_path_names, _INSTALL_SCHEMES,
1919
_get_default_scheme, _expand_vars,
20-
get_scheme_names)
20+
get_scheme_names, get_config_var)
2121

2222
class TestSysConfig(unittest.TestCase):
2323

@@ -254,6 +254,15 @@ def get(python):
254254
finally:
255255
unlink(link)
256256

257+
def test_user_similar(self):
258+
# Issue 8759 : make sure the posix scheme for the users
259+
# is similar to the global posix_prefix one
260+
base = get_config_var('base')
261+
user = get_config_var('userbase')
262+
for name in ('stdlib', 'platstdlib', 'purelib', 'platlib'):
263+
global_path = get_path(name, 'posix_prefix')
264+
user_path = get_path(name, 'posix_user')
265+
self.assertEquals(user_path, global_path.replace(base, user))
257266

258267
def test_main():
259268
run_unittest(TestSysConfig)

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ C-API
375375
Library
376376
-------
377377

378+
- Issue #8759: Fixed user paths in sysconfig for posix and os2 schemes.
379+
378380
- Issue #8663: distutils.log emulates backslashreplace error handler. Fix
379381
compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if
380382
stdout is not a TTY).

0 commit comments

Comments
 (0)