Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_sysconfig fails (test_user_similar) #53346

Closed
csernazs mannequin opened this issue Jun 28, 2010 · 8 comments
Closed

test_sysconfig fails (test_user_similar) #53346

csernazs mannequin opened this issue Jun 28, 2010 · 8 comments
Assignees
Labels
tests Tests in the Lib/test dir

Comments

@csernazs
Copy link
Mannequin

csernazs mannequin commented Jun 28, 2010

BPO 9100
Nosy @csernazs, @tarekziade, @merwok
Files
  • pdb_test_user_similar.txt: Debugging of the unittest.
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/merwok'
    closed_at = <Date 2011-10-09.07:26:26.410>
    created_at = <Date 2010-06-28.13:27:41.760>
    labels = ['tests']
    title = 'test_sysconfig fails (test_user_similar)'
    updated_at = <Date 2011-10-09.07:26:26.409>
    user = 'https://github.com/csernazs'

    bugs.python.org fields:

    activity = <Date 2011-10-09.07:26:26.409>
    actor = 'eric.araujo'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2011-10-09.07:26:26.410>
    closer = 'eric.araujo'
    components = ['Tests']
    creation = <Date 2010-06-28.13:27:41.760>
    creator = 'csernazs'
    dependencies = []
    files = ['17789']
    hgrepos = []
    issue_num = 9100
    keywords = []
    message_count = 8.0
    messages = ['108828', '129872', '129984', '131579', '145105', '145222', '145223', '145229']
    nosy_count = 4.0
    nosy_names = ['csernazs', 'tarek', 'eric.araujo', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue9100'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    @csernazs
    Copy link
    Mannequin Author

    csernazs mannequin commented Jun 28, 2010

    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.

    @csernazs csernazs mannequin added the tests Tests in the Lib/test dir label Jun 28, 2010
    @merwok
    Copy link
    Member

    merwok commented Mar 2, 2011

    Thanks for the report. What ./configure options did you use? I wonder if this is a duplicate of bpo-11171 or bpo-10086.

    @csernazs
    Copy link
    Mannequin Author

    csernazs mannequin commented Mar 3, 2011

    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').

    @merwok
    Copy link
    Member

    merwok commented Mar 21, 2011

    Would you like to turn your diagnostic into a patch?

    @merwok
    Copy link
    Member

    merwok commented Oct 7, 2011

    I will work on a patch.

    @merwok merwok assigned merwok and unassigned tarekziade Oct 7, 2011
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 9, 2011

    New changeset 1f8aef75558c by Éric Araujo in branch '3.2':
    Fix test_sysconfig when prefix != exec-prefix (bpo-9100).
    http://hg.python.org/cpython/rev/1f8aef75558c

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 9, 2011

    New changeset 27045f93e4cb by Éric Araujo in branch '2.7':
    Fix test_sysconfig when prefix != exec-prefix (bpo-9100).
    http://hg.python.org/cpython/rev/27045f93e4cb

    @merwok
    Copy link
    Member

    merwok commented Oct 9, 2011

    Now fixed.

    @merwok merwok closed this as completed Oct 9, 2011
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant