[Python-ideas] Draft PEP for virtualenv in the stdlib

Paul Moore p.f.moore at gmail.com
Tue Oct 25 20:11:40 CEST 2011


On 25 October 2011 18:37, Carl Meyer <carl at oddbird.net> wrote:
> On 10/24/2011 04:11 PM, Nick Coghlan wrote:
[...]
>>>    env.cfg
>>>    bin/python3
>>>    lib/python3.3/site-packages/
>>
>> The builtin virtual environment mechanism should be specified to
>> symlink things by default, and only copy things if the user
>> specifically requests it.
>
> To be clear, "things" here refers only to the Python binary itself. The
> only other things that might be installed in a new environment are
> scripts (e.g. pysetup3), and those must be created anew, neither
> symlinked nor copied, as their shebang line needs to point to the venv's
> Python (or more complicated chicanery with .exe wrappers on Windows,
> unless we get PEP 397 in time).

One thought - on "per user" Windows installations, or uninstalled
Python builds on Windows, IIRC python.exe requires pythonXY.dll to be
alongside the EXE. You should probably consider copying/linking that
if it's not installed systemwide. It's not entirely obvious to me how
you'd detect this, though - maybe take the simple approach of copying
python.exe, and also copying pythonXY.dll if it's in the same
directory otherwise assume it's a system install.

There's also pythonw.exe on Windows, of course... (I'm assuming that
w9xpopen.exe is probably not needed - I'm not even sure there's any
remaining need to ship it with Python in the first place).

Paul.



More information about the Python-ideas mailing list