Skip to content

Replace pyvenv.cfg's home key with base-prefix and base-exec-prefix #127895

Open
@FFY00

Description

@FFY00

Feature or enhancement

Proposal:

The home key in pyvenv.cfg is used to specify the directory where the base Python executable is. During the Path Initialization, this directory, and consecutively its parents, is searched for stdlib landmarks to determine sys.base_prefix and sys.base_exec_prefix. Naturally, this isn't ideal, it would be better if pyvenv.cfg contained these values directly.

Proposed plan:

  • Update venv to start setting the base-prefix and base-exec-prefix keys in pyvenv.cfg when creating/updating environments
  • In getpath, use the base-prefix and base-exec-prefix keys to set the prefixes
  • Deprecate specifying home, in pyvenv.cfg

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-venvRelated to the venv moduletype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions