[lxml-dev] setupinfo.py that downloads/builds libxml2/libxslt
Stefan Behnel
stefan_ml at behnel.de
Fri Nov 7 16:37:45 CET 2008
Hi,
Paul Everitt wrote:
> 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
Ah, I see what the problem is. I added that early cast to _Element recently,
but didn't forward-declare the class before use. It looks like the latest
Cython (0.10rc) handles this different that what you are using.
Should be fixed on the trunk now.
BTW, I'll switch to requiring Cython 0.10 for the trunk soon for a couple of
other reasons, but it's still better to fix this now.
Stefan
More information about the lxml-dev
mailing list