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

Try alternate filenames for system_executable #2442

Merged
merged 1 commit into from Nov 11, 2022

Commits on Nov 10, 2022

  1. Try alternate filenames for system_executable

    The value of `sys._base_executable` may not be a real file due to
    changes made in CPython 3.11. The value is derived from the current
    executable name and the "home" key from pyvenv.cfg.
    
    On POSIX systems, virtual environments deploy "python" for use within
    the venv however CPython's `make install` and a number of distributions
    do not provide a system "python" in part because of PEP 394.
    
    Virtualenv exposes this via `PythonInfo.system_executable` and can
    encounter issues when attempting to execute a non-existent file.
    
    Attempt to fallback to "python<MAJOR>" and "python<MAJOR>.<MINOR>" if
    "python" does not exist.
    
    Signed-off-by: Vincent Fazio <vfazio@gmail.com>
    vfazio authored and gaborbernat committed Nov 10, 2022
    Configuration menu
    Copy the full SHA
    1f9d4be View commit details
    Browse the repository at this point in the history