Comment 3 for bug 683584

Revision history for this message
Jeff Rush (jrush) wrote : Re: [Bug 683584] Re: plone.recipe.zope2instance needs support for system Python feature of buildout > 1.5

On 12/01/2010 06:16 AM, Alex Clark wrote:
>
> Thanks for the patch!
>
> But I don't fully understand this. Why would I want to use a system
> Python instead of a virtualenv? It seems to me zc.buildout should be
> trying to provide a similar isolation as is provided by virtualenv, to
> "save" people from having to do:
>
> $ virtualenv --no-site-packages foo ; cd foo ; bin/pip install
> zc.buildout ; bin/buildout init
>
> In other words, create a buildout inside a virtualenv to isolate from
> site-packages. Does this patch provide such isolation? And if so, how?

Yes, this patch makes the plone.recipe.zope2instance recipe cooperate
with zc.buildout in providing the behavior of virtualenv. Many people
have asked for this feature in zc.buildout over years. Jim Fulton added
to zc.buildout in v1.5.0 the logic to insulate buildouts from the
site-packages of the system Python, but it requires this small change to
any recipe that generates scripts.

What Jim added to zc.buildout is where it now uses the system Python
binary executable (/usr/bin/python) but rewrites the PYTHON_PATH in each
script that a recipe produces such that that executable does not
actually pull in anything from /usr/lib/python2.6/site-packages/. It
only gets the packages from the buildout itself.

I hope this helps clarify things - if not please ask more.

-Jeff