This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_sysconfig fails (test_user_similar)
Type: Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: csernazs, eric.araujo, python-dev, tarek
Priority: normal Keywords:

Created on 2010-06-28 13:27 by csernazs, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pdb_test_user_similar.txt csernazs, 2010-06-28 13:27 Debugging of the unittest.
Messages (8)
msg108828 - (view) Author: Zsolt Cserna (csernazs) * Date: 2010-06-28 13:27
Python 2.7rc2

test_user_similar test in test_sysconfig fails for me. I think it's because I have different --exec-prefix and --prefix specified. The test assumes that get_config_var('base') is the part of the global_path = get_path('platstdlib', 'posix_prefix') which is not necessarily true.

I've attached the pdb output containing the variable names.
msg129872 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-02 11:13
Thanks for the report.  What ./configure options did you use?  I wonder if this is a duplicate of #11171 or #10086.
msg129984 - (view) Author: Zsolt Cserna (csernazs) * Date: 2011-03-03 17:32
No, I think it's not the duplicate of any of the bugs you've specified.
Meanwhile I've installed to another location and it's now python 2.7.1, but the problem still present:

My configure parameters are:
--prefix=//ms/dist/python/PROJ/core/2.7.1-1/common --exec-prefix=//ms/dist/python/PROJ/core/2.7.1-1/.exec/ia32.linux.2.6.glibc.2.3 --enable-shared

The error message is:

AssertionError: '/ms/user/a/and/.local/lib/python2.7' != '/ms/user/a/and/.local/exec/lib/python2.7'

I'm executing the python interpreter from:
//ms/dist/python/PROJ/core/2.7.1/exec/bin/python

(which is the same as //ms/dist/python/PROJ/core/2.7.1-1/.exec/ia32.linux.2.6.glibc.2.3/bin/python)

In the unittest I have the following variables:
sysconfig.get_config_var('base') = '/ms/dist/python/PROJ/core/2.7.1'
sysconfig.get_config_var('userbase') = '/ms/user/a/and/.local'
sysconfig.get_path('stdlib', 'posix_prefix') = '/ms/dist/python/PROJ/core/2.7.1/lib/python2.7'
sysconfig.get_path('stdlib', 'posix_user') = '/ms/user/a/and/.local/lib/python2.7'
sysconfig.get_path('platstdlib', 'posix_prefix') = '/ms/dist/python/PROJ/core/2.7.1/exec/lib/python2.7'
sysconfig.get_path('platstdlib', 'posix_user') = '/ms/user/a/and/.local/lib/python2.7'
sysconfig.get_path('purelib', 'posix_prefix') = '/ms/dist/python/PROJ/core/2.7.1/lib/python2.7/site-packages'
sysconfig.get_path('purelib', 'posix_user') = '/ms/user/a/and/.local/lib/python2.7/site-packages'
sysconfig.get_path('platlib', 'posix_prefix') = '/ms/dist/python/PROJ/core/2.7.1/exec/lib/python2.7/site-packages'
sysconfig.get_path('platlib', 'posix_user') = '/ms/user/a/and/.local/lib/python2.7/site-packages'

I think the problem is that while get_path('platstdlib', 'posix_prefix') returns an exec-specific path different from get_path('stdlib', 'posix_prefix'), get_path('platstdlib', 'posix_user') returns the same as get_path('stdlib', 'posix_user').
msg131579 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-21 00:17
Would you like to turn your diagnostic into a patch?
msg145105 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-07 17:10
I will work on a patch.
msg145222 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-09 06:59
New changeset 1f8aef75558c by Éric Araujo in branch '3.2':
Fix test_sysconfig when prefix != exec-prefix (#9100).
http://hg.python.org/cpython/rev/1f8aef75558c
msg145223 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-09 07:00
New changeset 27045f93e4cb by Éric Araujo in branch '2.7':
Fix test_sysconfig when prefix != exec-prefix (#9100).
http://hg.python.org/cpython/rev/27045f93e4cb
msg145229 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-10-09 07:26
Now fixed.
History
Date User Action Args
2022-04-11 14:57:02adminsetgithub: 53346
2011-10-09 07:26:26eric.araujosetstatus: open -> closed
resolution: fixed
messages: + msg145229

stage: resolved
2011-10-09 07:00:11python-devsetmessages: + msg145223
2011-10-09 06:59:51python-devsetnosy: + python-dev
messages: + msg145222
2011-10-07 17:10:16eric.araujosetassignee: tarek -> eric.araujo
messages: + msg145105
versions: - Python 3.1
2011-03-21 00:17:07eric.araujosetnosy: csernazs, tarek, eric.araujo
messages: + msg131579
versions: + Python 3.1, Python 3.2, Python 3.3
2011-03-03 17:32:16csernazssetnosy: csernazs, tarek, eric.araujo
messages: + msg129984
2011-03-02 11:13:07eric.araujosetnosy: + eric.araujo
messages: + msg129872
2010-08-01 23:02:13georg.brandlsetassignee: tarek

nosy: + tarek
2010-06-28 13:27:41csernazscreate