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

sysconfig does not like symlinks #52128

Closed
florentx mannequin opened this issue Feb 7, 2010 · 8 comments
Closed

sysconfig does not like symlinks #52128

florentx mannequin opened this issue Feb 7, 2010 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@florentx
Copy link
Mannequin

florentx mannequin commented Feb 7, 2010

BPO 7880
Nosy @pitrou, @tarekziade, @ezio-melotti, @florentx
Files
  • issue7880_sysconfig.diff: Patch, apply to trunk
  • 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/tarekziade'
    closed_at = <Date 2010-03-23.11:48:42.532>
    created_at = <Date 2010-02-07.23:22:10.749>
    labels = ['type-bug', 'library']
    title = 'sysconfig does not like symlinks'
    updated_at = <Date 2010-03-23.11:48:42.531>
    user = 'https://github.com/florentx'

    bugs.python.org fields:

    activity = <Date 2010-03-23.11:48:42.531>
    actor = 'flox'
    assignee = 'tarek'
    closed = True
    closed_date = <Date 2010-03-23.11:48:42.532>
    closer = 'flox'
    components = ['Library (Lib)']
    creation = <Date 2010-02-07.23:22:10.749>
    creator = 'flox'
    dependencies = []
    files = ['16173']
    hgrepos = []
    issue_num = 7880
    keywords = ['patch']
    message_count = 8.0
    messages = ['99027', '99028', '99029', '99030', '99112', '99113', '99114', '100818']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'tarek', 'ezio.melotti', 'flox']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7880'
    versions = ['Python 2.7', 'Python 3.2']

    @florentx
    Copy link
    Mannequin Author

    florentx mannequin commented Feb 7, 2010

    ~ $ cd /tmp
    ~ $ ln -s /usr/local/bin/python .
    ~ $ ./python -c "import sys; print sys.executable"
    'import site' failed; use -v for traceback
    /tmp/python

    @florentx florentx mannequin assigned tarekziade Feb 7, 2010
    @florentx florentx mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Feb 7, 2010
    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Feb 7, 2010

    Here's the traceback, I'll look at the problem asap

    'import site' failed; traceback:
    Traceback (most recent call last):
      File "/MacDev/svn.python.org/python-trunk/Lib/site.py", line 530, in <module>
        main()
      File "/MacDev/svn.python.org/python-trunk/Lib/site.py", line 509, in main
        addbuilddir()
      File "/MacDev/svn.python.org/python-trunk/Lib/site.py", line 118, in addbuilddir
        s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
      File "/MacDev/svn.python.org/python-trunk/Lib/sysconfig.py", line 577, in get_platform
        cfgvars = get_config_vars()
      File "/MacDev/svn.python.org/python-trunk/Lib/sysconfig.py", line 402, in get_config_vars
        _init_posix(_CONFIG_VARS)
      File "/MacDev/svn.python.org/python-trunk/Lib/sysconfig.py", line 255, in _init_posix
        raise IOError(msg)
    IOError: invalid Python installation: unable to open /usr/local/lib/python2.7/config/Makefile (No such file or directory)

    @florentx
    Copy link
    Mannequin Author

    florentx mannequin commented Feb 7, 2010

    proposed fix.

    @florentx
    Copy link
    Mannequin Author

    florentx mannequin commented Feb 7, 2010

    actually realpath == abspath on most platforms where symlink is not implemented.

    Changed.

    @pitrou
    Copy link
    Member

    pitrou commented Feb 9, 2010

    Why would sys.executable be a directory?

    @tarekziade
    Copy link
    Mannequin

    tarekziade mannequin commented Feb 9, 2010

    Antoine, see http://bugs.python.org/issue7774

    @florentx
    Copy link
    Mannequin Author

    florentx mannequin commented Feb 9, 2010

    Yes, it is the issue bpo-7774.

    The patch proposed on msg98284 should fix sys.executable being a directory.

    Tarek, if you implement the patch for sysconfig, add a note regarding the dir hack:
    # XXX : see bpo-7774

    @florentx
    Copy link
    Mannequin Author

    florentx mannequin commented Mar 11, 2010

    Fixed in r78828 and r78829 (py3k), except for the part related to bpo-7774.

    (It was turning buildbots red, after Victor fixed bpo-3137)

    @florentx florentx mannequin closed this as completed Mar 23, 2010
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant