[lxml-dev] Help getting lxml to work reliably on MacOS-X

Christian Zagrodnick cz at gocept.com
Thu Feb 7 16:36:02 CET 2008


On 2008-02-07 08:52:40 +0100, Christian Zagrodnick <cz at gocept.com> said:

> 
> On 05.02.2008, at 21:22, Stefan Behnel wrote:
> 
>> Hi,
>> 
>> Christian Zagrodnick wrote:
>>> We use buildout for the development/deployment. Via buildout we build
>>> basically everything to be sure we get consistent results
>> 
>> Martijn also made a buildout script for lxml a while ago:
>> 
>> http://faassen.n--tree.net/blog/view/weblog/2006/10/03/0
>> 
>> I guess this is really helpful. Definitely for production
> 
>> environments, but it
>> might also come in handy for Mac users.
>> 
>> Can someone enlighten me how finding libxml2/libxslt works here at
> 
>> runtime?
> 
> Well, the generated scripts use the compiled lxml:
> 
> % grep lxml bin/test
>    '/Users/zagy/.../develop-eggs/lxml-2.0-py2.4-macosx-10.5-i386.egg',
> 
> And actually I thought the `rpath` option was there to do that:
> 
> rpath: A new-line separated list of directories to search for dynamic
> 
> libraries at run time.
> 
> But that doesn't exactly seem to work as it really seems lxml would
> 
> use the system libraries at runtime. Gotta ask jim.

Right, so actually buildout does the right thing.

The main problem is, that lxml runs the wrong xslt-config. So I was 
bascially buildint libxml2 and libxslt just for the fun of it.

The question is if lxml really always needs to call xslt-config. Or how 
one would set the path in the buildout so that the right xslt-config is 
called.

If I manually set the path it works like charm:

    % PATH=`pwd`/parts/libxslt/bin:$PATH bin/buildout


-- 
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891





More information about the lxml-dev mailing list