Skip to content

Symlink resolution pins Homebrew Cellar paths and rewrites distro aliases #86

@gaborbernat

Description

@gaborbernat

The executable symlink resolution from #84 follows every symlink hop. For Homebrew pythons this resolves /opt/homebrew/bin/python3.12 through the version-pinned Cellar/python@3.12/<version> path, recording a home that breaks on brew upgrade and changes the alias under which the base site-packages appears in created environments (caught by pypa/virtualenv CI on the brew@3.12/brew@3.13 jobs). It also needlessly rewrites stable aliases like Debian's /usr/bin/python3.

Real getpath only follows the executable symlink while the stdlib landmark is missing next to it. Mirror that: stop resolving once <dir>/../lib(64)/pythonX.Y/os.py is reachable, and skip resolution entirely for macOS framework builds, which self-locate through the real binary via dyld at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions