[Distutils] reservations about pythonv

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Mar 17 00:13:09 CET 2011

Barry Warsaw <barry <at> python.org> writes:
> Here at the sprints we talked about several possible options, the details of
> which of course will have to be hashed out.  There will also be cross platform
> considerations.  I think on *nix at least, it would be nice if a symlink and
> configuration file were enough to trigger the virtualenv behavior.

I feel that this approach definitely has potential to be the most useful and
practical. There's no reason for a separate executable if Python itself
incorporates the virtual environment functionality, which is mostly about
setting paths and environment variables.

> For example, if I have a local 'python' symlinked to the real executable, with
> a pythonv.conf file next to it, the virtual environment would be enabled.  The
> real Python binary would adjust its behavior in that case to know where the
> standard library was, but also use the locally installed packages.  Anyway,
> that's how I'd *like* it to work on *nix, but it may have to work differently
> on Windows, and it may have to work differently if environment variables have
> to be set.

Even if on Windows you have to copy rather than symlink, that could just be the
main Python executable, which is not prohibitively large since the core of
Python is in pythonX.Y.dll.


Vinay Sajip

More information about the Distutils-SIG mailing list