[Distutils] pythonv, take two

Vinay Sajip vinay_sajip at yahoo.co.uk
Sat Apr 2 12:35:20 CEST 2011


Carl Meyer <carl <at> oddbird.net> writes:

> 

> People tend to create a lot of virtualenvs. I don't think copying the
> entire Python installation is viable (it is slow, and it also would mean
> that security updates to the base standard library would not be
> reflected in the virtualenv).

You're probably right - I haven't actually tried it.

> But, as I mentioned, the fact that easy_install itself relies on finding
> site-packages relative to sys.prefix forces the issue - easy_install
> (including existing versions of it) needs to just work.

Presumably this means that we can't use site_prefix in the short term, and just
have it there to allow code to evolve compatibility to it. So everything else
just uses site.prefix and site.exec_prefix as it does currently, and we achieve
parity with virtualenv as far as compatibility is concerned. Internally, we use
sys.installed_prefix and sys.installed_exec_prefix when we need to. We still
benefit from the fact that no copying of the standard lib is needed, we're just
using the stock site.py etc.

BTW you might find this script handy while testing:

https://gist.github.com/896831

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list