plone.recipe.zope2instance needs support for system Python feature of buildout > 1.5

Bug #683584 reported by Jeff Rush
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
collective.buildout
Fix Released
Undecided
Hanno Schlichting

Bug Description

zc.buildout 1.5 added support for using system Python interpreters for buildouts instead of requiring the use of virtualenv sandboxes. A handful of lines needs to be added to this recipe to support it. The feature makes use of buildout with this recipe much simpler.

To read about this feature in zc.buildout:

    http://pypi.python.org/pypi/zc.buildout/1.5.2#id78

I am attaching a patch that adds support to plone.recipe.zope2instance. I have run it here and my Zope instances run fine.

Revision history for this message
Jeff Rush (jrush) wrote :
Revision history for this message
Alex Clark (aclark) wrote :

Hi Jeff,

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?

Thanks for any comments,

Alex

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

Changed in collective.buildout:
assignee: nobody → Hanno Schlichting (hannosch)
status: New → Fix Committed
Changed in collective.buildout:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.