Christian Zagrodnick | 5 Feb 14:01 2008

Re: Help getting lxml to work reliably on MacOS-X

Hey,

On 2008-02-04 09:45:37 +0100, Stefan Behnel <stefan_ml <at> behnel.de> said:

> Hi,
> 
> it looks like many Mac users have problems with lxml on their platform. This
> usually involves installing up-to-date dependencies (libxml2/libxslt) in
> addition to the system libraries. I would like to get these problems resolved.
> 
> To get a start on this, we must collect some information. We had a few
> reports, but I need to know in more detail what people did, what they tried,
> and to what avail. So here is a list of questions for Mac users. Please help
> us by answering them. Some instructions follow at the end.
> 
> When building lxml, please move any installed Cython versions out of the way
> and run the build on the unpacked lxml-2.0.tar.gz release sources. It must say
> "trying to build without Cython" at the beginning.
> 
> Please provide the following information:
> 
> - what package management system (fink/macports) do you use?

We use buidout for the development/deployment. Via buildout we build 
basically everything to be sure we get consistent results:

[libxml2]
recipe = zc.recipe.cmmi
url = http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.26.tar.gz
extra_options = --without-python
(Continue reading)

Stefan Behnel | 5 Feb 21:22 2008
Picon

Re: Help getting lxml to work reliably on MacOS-X

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?

Martijn, you suggested adding this to lxml back then. I think we should have
this in SVN so that people can use it straight away.

Stefan
Christian Zagrodnick | 7 Feb 08:52 2008

Re: Help getting lxml to work reliably on MacOS-X


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.

(Continue reading)

Christian Zagrodnick | 7 Feb 16:36 2008

Re: Help getting lxml to work reliably on MacOS-X

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:
(Continue reading)

Stefan Behnel | 8 Feb 20:43 2008
Picon

Re: Help getting lxml to work reliably on MacOS-X

Hi,

Christian Zagrodnick wrote:
> The main problem is, that lxml runs the wrong xslt-config. So I was 
> basically building 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

You can now pass "--with-xslt-config=XXX" to setup.py.

Stefan
Christian Zagrodnick | 9 Feb 14:33 2008

Re: Help getting lxml to work reliably on MacOS-X

On 2008-02-08 20:43:18 +0100, Stefan Behnel <stefan_ml <at> behnel.de> said:

> Hi,
> 
> Christian Zagrodnick wrote:
>> The main problem is, that lxml runs the wrong xslt-config. So I was
>> basically building 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
> 
> You can now pass "--with-xslt-config=XXX" to setup.py.

Gotta check how we best pass that along in buildout.

--

-- 
Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891
Christian Zagrodnick | 19 Feb 15:15 2008

Re: Help getting lxml to work reliably on MacOS-X

On 2008-02-09 14:33:43 +0100, Christian Zagrodnick <cz <at> gocept.com> said:

> On 2008-02-08 20:43:18 +0100, Stefan Behnel <stefan_ml <at> behnel.de> said:
> 
>> Hi,
>> 
> 
>> Christian Zagrodnick wrote:
>>> The main problem is, that lxml runs the wrong xslt-config. So I was
>>> basically building 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
>> 
> 
>> You can now pass "--with-xslt-config=XXX" to setup.py.
> 
> Gotta check how we best pass that along in buildout.

So in the *next* version of zc.recipe.egg (i.e. >1.0.0), the following 
will probably work. It works with the trunk of zc.recipe.egg (but this 
is neither released nor has it been reviewed by Jim Fulton, yet):
(Continue reading)

Stefan Behnel | 11 Mar 20:37 2008
Picon

Re: Help getting lxml to work reliably on MacOS-X

Hi,

Christian Zagrodnick wrote:
> On 2008-02-09 14:33:43 +0100, Christian Zagrodnick <cz <at> gocept.com> said:
>> On 2008-02-08 20:43:18 +0100, Stefan Behnel <stefan_ml <at> behnel.de> said:
>>> Christian Zagrodnick wrote:
>>>> The main problem is, that lxml runs the wrong xslt-config. So I was
>>>> basically building 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
>>> You can now pass "--with-xslt-config=XXX" to setup.py.

... and --with-xml2-config=YYY, just in case you installed both in different
places.

>> Gotta check how we best pass that along in buildout.
> 
> So in the *next* version of zc.recipe.egg (i.e. >1.0.0), the following 
> will probably work. It works with the trunk of zc.recipe.egg (but this 
> is neither released nor has it been reviewed by Jim Fulton, yet):
> 
> [lxml-environment]
> PATH=${buildout:directory}/parts/libxslt/bin:%(PATH)s
[...]
(Continue reading)


Gmane