[lxml-dev] lxml Mac installation idea

Mark Bestley {bymail{ignore} at bestley.co.uk
Mon Nov 3 10:24:22 CET 2008


On Sun, 02 Nov 2008 19:55:09 -0000, Stefan Behnel <stefan_ml at behnel.de>  
wrote:

> Hi Ian,
>
> Ian Bicking wrote:
>> Stefan Behnel wrote:
>> but I'd like it to work without buildout, and there's also several
>> buildout recipes and configurations out there and not one clear
>> canonical way to build lxml.
>
> I wouldn't mind to ship lxml with a buildout recipe. I think the current
> problem is that if we wait to find one that works well for as many  
> people as
> possible, we'll wait forever. So I'm fine with adding any script that's
> somewhat tested and in use. Even a set of scripts that you can try is  
> better
> than none if people can't manage to build lxml themselves.
>
>

>
>> * Macs come with bad versions of libxml2 and libxslt (depending on the
>> version of the OS, you get either very bad, or not as bad, but bad
>> enough that you'll eventually get a segfault but not immediately, which
>> is actually much worse)
>>
>> * People keep getting the wrong runtime linking, and DYLD_LIBRARY_PATH
>> seems to be necessary.
>
> That makes a case for a static build, IMHO.
>

Another way might be as done by Enthought and have lxml's own copy of the  
dynamic libraries
ending up in  
site-packages/lxml-2.1.1.0001-py2.5-macosx-10.3-fat.egg/lxml/libxslt.dylib


>
>> * There's several kinds of Python that people use on a Mac: at least the
>> system python, macports python, and fink python.  I think there might be
>> another.  They are all somewhat different.
>
> I'm not sure this makes a difference, distutils should handle this. The  
> only
> problem is that this keeps us from preparing binaries for MacOS.
>
I would suggest that for binaries you only need to consider the system  
python
although that differs with each version of the OS. The reason I say this  
is that
macports and Fink tend to have everything done through their own port  
environment.
Macports does have lxml already

There are also users that have built their own python to get the latest  
version
e.g. 2.5.2 or 2.6 but they can use a compiler so a setup or buildout  
should be sufficient

Even if I am wrong on this it is a start and I think would help those who
know the least about the non Python parts of the Mac environment
>
>> * It's not that obvious how to build libxml2, unless you are using
>> macports (which has a port for it).
>
> Not sure what you mean here. Isn't cmmi enough?
>
>
>> * Once you do build it, you have to be sure to get the right
>> xml2-config, which doesn't happen by default.
>
> Another reason for defaulting to a static build here.
>
>




-- 
Mark



More information about the lxml-dev mailing list