Comment 4 for bug 158756

Revision history for this message
Andi Zeidler (witsch) wrote : Re: [Bug 158756] Re: system path should be ignorable/overridable

On Nov 19, 2007, at 7:51 PM, Jim Fulton wrote:
> I don't believe this has anything to do with it.

well, i've tried all this before posting the comment. actually things
were working fine for me (on osx with a setuptools egg), but nouri's
reported a problem on ubuntu, so i took my gf's computer and spent
about two hours debugging the various combinations. so, what can i
say? i'm pretty sure it does have to do with this... :)

> Buildout, as a
> matter of policy, includes whatever Python path is used to run the
> buildout, regardless of where it finds the setuptools eggs.

imho, `bootstrap.py` already creates the problem. please try
installing setuptools as a package in site-packages, run
`bootstrap.py` and have a look at the resulting `bin/buildout`, then
do the same with setuptools installed as a global egg and without
having it installed at all.

>> however, if setuptools isn't installed as a "regular" package in the
>> system, but either not at all or as an egg via `easy_install`,
>> `bootstrap.py` will download or copy it into its `eggs/` directory
>> and
>> `.../site-packages` will not be included into `sys.path`, effectively
>> fixing these problems.
>
> Have you seen this "fix" the problem?

yes, this fixed the problem for me and nouri's also verified it.

> I'm 99% that when constructing
> working sets (paths) that the entire Python path is searched
> regardless of where setuptools is installed.

that may be the case, but the problem is that `site-packages` gets
injected into `sys.path` before `lib/python` of the zope installation,
so egg installed there will shadow modules in zope, which is not what
one would expect, imho. again, this is not the case when setuptools
is installed as an egg. however, as setuptools are always required,
`working_set` will return `.../site-packages` as its location — in
case it's a global package.

> I don't believe this is a bootstrapping issue.

jim, please excuse me, but this really doesn't help too much. could
you please try it at least? it should only take a few minutes... i
will create a workaround in the recipe if you cannot reproduce it, but
the problem really is in buildout, imho.

best regards,

andi

--
zeidler it consulting - http://zitc.de/ - <email address hidden>
friedelstraße 31 - 12047 berlin - telefon +49 30 25563779
pgp key at http://zitc.de/pgp - http://wwwkeys.de.pgp.net/
plone 3.0.3 released! -- http://plone.org/products/plone