[lxml-dev] setupinfo.py that downloads/builds libxml2/libxslt
Paul Everitt
paul at agendaless.com
Fri Nov 7 16:51:30 CET 2008
On Nov 7, 2008, at 10:37 AM, Stefan Behnel wrote:
> 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.
Yep, that fixed it, for both Python 2.4 and 2.5...at least, for
building.
Running was a different story:
>>> from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/paul/venvs/lxml2.5.2/lib/python2.5/site-
packages/lxml-2.2alpha1-py2.5-macosx-10.3-i386.egg/lxml/etree.so, 2):
Symbol not found: _iconv
Referenced from: /Users/paul/venvs/lxml2.5.2/lib/python2.5/site-
packages/lxml-2.2alpha1-py2.5-macosx-10.3-i386.egg/lxml/etree.so
Expected in: dynamic lookup
--Paul
More information about the lxml-dev
mailing list