[Distutils] buildout and system packages: a simpler idea?

Reinout van Rees reinout at vanrees.org
Sun Sep 18 01:27:25 CEST 2011


Hi,

Buildout and system packages are apparently hard. Buildout 1.5.x tries 
hard to get it working, but I cannot get it to work (reliably), for 
instance.

Perhaps the problem is that we're trying too hard. Both buildout 1.5.x 
and the osc.recipe.sysegg recipe that I'm using on 1.4.x are trying to 
look up packages and trying to include them in the path.

What you normally want is just to use the system's PIL and mapnik and 
numpy. All stuff that you really don't want to build from source. So you 
assume it is installed with a clicky-clicky installer on windows and 
with apt-get on ubuntu.

Why not use this assumption? Add an "assumed-available" option to 
buildout that lists the eggs that are assumed to be available locally? 
No need to actually search them (which is the thing that breaks 1.5.x 
for me). Just make sure the regular python path is in place as the last 
item in sys.path.


Possible addition: allow a dotted path as a second parameter after the 
"assumed-available" eggs: buildout tries to import that path to check 
the availability of the egg that's assumed to be available.


So: if you need system eggs, you won't run buildout without system 
paths. Only thing left is to tell buildout that certain eggs are 
available locally so that it doesn't search for it. Just assume they're 
there and leave it at that.


Reinout

-- 
Reinout van Rees                    http://reinout.vanrees.org/
reinout at vanrees.org             http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"



More information about the Distutils-SIG mailing list