[lxml-dev] setupinfo.py that downloads/builds libxml2/libxslt

Paul Everitt paul at agendaless.com
Fri Nov 7 16:06:29 CET 2008


On Nov 6, 2008, at 4:32 PM, Stefan Behnel wrote:

> Hi,
>
> Stefan Behnel wrote:
>> Ian Bicking wrote:
>>> I've attached a version of setupinfo.py that will download and build
>>> libxml2 and libxslt.  There are some problems with the script, but
>>> hopefully this is a start.
>>
>> thanks a lot for doing this. It does not yet build a static lxml  
>> for me (the
>> static stuff was meant for Windows and it doesn't really work on  
>> other
>> systems), but I'm fixing it up to do that.
>
> Ok, I reworked your (pretty complete and well done) implementation  
> and renamed
> the option to "--static-deps" to make it clear that it triggers a  
> static build
> (the name is still open to improvement). It's on the trunk now.  
> Everyone who
> can give it a try: please install a recent Cython and do so! Fixes  
> and bug
> reports are very welcome.
>
> Since the main incentive for this change was to make it work under  
> MacOS-X,
> here's a big plea for Mac users to test this and suggest fixes!

First, thanks Stefan and Ian for working on this.  I really hope it  
works out.

I just gave it a try with: MacIntel, OS X 10.5.5, Python 2.4.4 in a  
virtualenv.

This resulted, after lots of downloading and compiling, with:

cythoning src/lxml/lxml.etree.pyx to src/lxml/lxml.etree.c

Error converting Pyrex file to C:
------------------------------------------------------------
...
     cdef readonly object localname
     cdef readonly object namespace
     def __init__(self, text_or_uri_or_element, tag=None):
         if not _isString(text_or_uri_or_element):
             if isinstance(text_or_uri_or_element, _Element):
                 text_or_uri_or_element =  
(<_Element>text_or_uri_or_element).tag
                                                   ^
------------------------------------------------------------

This is with Cython-0.9.8.1.1-py2.4-macosx-10.3-i386.egg

--Paul



More information about the lxml-dev mailing list