[lxml-dev] python crashes in xmlDictFree inside Zope

Gary Poster gary at zope.com
Mon Jun 4 16:17:06 CEST 2007


On Jun 4, 2007, at 9:39 AM, David Pratt wrote:

> Hi Gary. I'd definitely be interested in more details about your  
> buildout for these tools. I am also using buildouts and would much  
> rather keep everything local to project. I am no longer using my  
> system python for anything and relying on mac's tools seems lame  
> since I want more control over versions being used, etc.
>
> Regards,
> David

ok

in [buildout], make sure "parts" includes "libxml2 libxslt lxml".

I also include 'lxml' in my install_requires in my setup.py, but that  
probably is redundant; haven't bothered to find out.

I use these three sections:

[lxml]
recipe = zc.recipe.egg:custom
egg = lxml == 1.3beta
include-dirs = ${libxml2:location}/include/libxml2:$ 
{libxslt:location}/include
rpath = ${libxml2:location}/lib:${libxslt:location}/lib
library-dirs = ${libxml2:location}/lib:${libxslt:location}/lib

[libxml2]
recipe = zc.recipe.cmmi
url = XXX our private download cache of libxml2-2.6.28.tar.gz XXX
extra_options = --without-python

[libxslt]
recipe = zc.recipe.cmmi
url = XXX our private download cache of libxslt-1.1.20.tar.gz XXX
extra_options = --without-python --with-libxml-prefix=$ 
{libxml2:location}

When I run bin/test and bin/py I need to insert the DYLD_LIBRARY_PATH  
in the environment; I've planned to write a quick recipe for a shell  
script that would do that, but have not gotten around to it.  If you  
are using zdaemon, you can leverage it to do that for zopectl start  
and zopectl fg.  Using one of the Zope 3 instance recipes I specify  
the environment:

zdaemon.conf =
   <environment>
    DYLD_LIBRARY_PATH ${libxml2:location}/lib:${libxslt:location}/lib
    LD_LIBRARY_PATH ${libxml2:location}/lib:${libxslt:location}/lib
</environment>

(Mac only needs the DYLD one)

Gary



More information about the lxml-dev mailing list