[Distutils] zc.buildout fails to use system-installed dep?

Marius Gedminas marius at pov.lt
Wed Dec 8 17:32:03 CET 2010


On Wed, Dec 08, 2010 at 12:21:55PM +0100, Reinout van Rees wrote:
> On 12/05/2010 11:14 PM, Alan Franzoni wrote:
> >I've verified this happens all the times on Ubuntu 10.10, both 32 and
> >64 bit. I don't know if it's Ubuntu's or zc.buildout's fault; I've
> >opened a ticket.
> 
> I have the same problem on ubuntu.  I never managed to find out what
> the real reason is, but my guess is that it's ubuntu's way of
> installing python packages for multiple python versions.  You have a
> /usr/lib/python2.6/dist-packages/ directory,

which is on sys.path

> but also a
> /usr/lib/pyshared/python2.6/,

which isn't.

But then there's /usr/lib/pymodules/python2.6, which is on sys.path,
and I've no idea what it's about.  dist-packages/python-support.pth adds
this one.

> for instance.  Something somewhere is
> doing some funny sys.path mangling, probably ubuntu.

Debian and Ubuntu use dist-packages instead of site-packages to avoid
conflicts with manual installations (I'm not sure if they mean manual as
in sudo easy_install foo, or if they mean manual as in self-compiled
Pythons.  Probably the latter.).

If zc.buildout assumes it can find system packages in site-packages
instead of dist-packages, then it would fail.  I've no idea if that's
actually the case.

/usr/share/doc/python/python-policy.txt.gz has more information about
Debian and Ubuntu specifics.

> The end result is that I still haven't gotten buildout 1.5.x to work
> on ubuntu with the system packages that I need.  I'm still at 1.4.4
> with the custom 1.4-x-only bootstrap, in combination with
> osc.recipe.sysegg

IIRC you can use the new bootstrap and ask it to get a specific version
of zc.buildout.  I never needed recipes to use system Python packages in
1.4 buildouts, but that was before Python 2.6 and dist-packages --
Debian's Python 2.5 still uses site-packages.

> I hope to have some debugging-time in January, as it is pretty
> irritating not to be able to use buildout 1.5.x ;-)

Marius Gedminas
-- 
"... one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs."
                -- Robert Firth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20101208/d1e9f78b/attachment.pgp>


More information about the Distutils-SIG mailing list