Skip to content

Add an option to disable realpath when creating venv #138889

@seven1oe

Description

@seven1oe

These two lines of code sometimes make the executable path point somewhere unexpected:

real_env_exe = os.path.realpath(context.env_exe)

f.write('executable = %s\n' % os.path.realpath(sys.executable))

Based on the following issue, realpath is necessary in some cases. However, there are situations where using "redirects, links or junctions" is intentional! For example, using subst to change drive letters or path for venv.
#89500

Would it be possible to add an option to disable the use of realpath during venv creation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-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