[Distutils] buildout and zc.recipe.egg:custom problems

Jim Fulton jim at zope.com
Wed Nov 22 20:31:56 CET 2006

Martijn Faassen wrote:
> Hi there,
> I'm trying to induce zc.buildout's zc.recipe.egg:custom recipe to build 
> a library (lxml) against C libraries (libxml2, libxslt) installed in a 
> custom place, i.e. as parts, such as parts/libxml2/include and 
> parts/libxml2/lib.
> I thought I had that working before and even blogged about it, but it 
> turns out that something's not entirely right yet.
> Right now I'm struggling to actually see an 'include-dirs' directive to 
> have any effect on what's passed along to the C-compiler (namely the -I) 
> option. It doesn't. After some research I think I've figured out why. 
> I've installed lxml as a development egg, and somehow it always gets 
> built the default way. The custom egg's install code is reached, but 
> only when it's too late and lxml is already built. Therefore any special 
> options such as include-dirs and library-dirs are never passed, as lxml 
> has already been created.
> I figure lxml gets created automatically and not through the custom 
> recipe as I have it listed as a develop egg in the [buildout] section.
> What to do about this?

Unfortunately, you've hit a limitation in buildout and the custom recipe.
This limitation will, eventually, be removed.  When creating develop eggs,
you have no control over build options.  When creating custom eggs,
you have no way to use directories as source, and besides, you really want
a develop egg.

I think what we want is a develop recipe that lets you specify various
options when creating develop eggs.  I'll look at writing this over
the next few days.  BTW, I think we also need to segregate develop eggs
by Python version, since buildout allows creating multiple applications
with different Python versions.  This is also something I plan in the
near future.


Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org

More information about the Distutils-SIG mailing list