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

Set 'home' to parent directory of system_executable #2441

Merged
merged 1 commit into from Nov 12, 2022

Commits on Nov 11, 2022

  1. Set 'home' to parent directory of system_executable

    PEP 405 says of the "home" key:
    
    "If a home key is found, this signifies that the Python binary belongs
    to a virtual environment, and the value of the home key is the directory
    containing the Python executable used to create this virtual
    environment."
    
    And:
    
    "In this case, prefix-finding continues as normal using the value of the
    home key as the effective Python binary location, which finds the prefix
    of the base installation."
    
    Previously, "home" was being set to `interpreter.system_exec_prefix`
    which does not abide by the PEP specification.
    
    In Python 3.11, the "home" directory is used to determine the value of
    `sys._base_executable`, so if the path specified is incorrect, the
    path + interpreter returned will be invalid. This can cause headaches
    later when trying to probe info via the discovery module.
    
    Now, set this to the parent directory of `interpreter.system_executable`.
    
    Signed-off-by: Vincent Fazio <vfazio@gmail.com>
    vfazio committed Nov 11, 2022
    Configuration menu
    Copy the full SHA
    812b26f View commit details
    Browse the repository at this point in the history