
Hi, I just built lxml 0.9 on my OS X machine and made an egg: total 712 -rw-r--r-- 1 gracinet wheel 363037 Mar 21 12:48 lxml-0.9-py2.4- macosx-10.4-ppc.egg How do you want me to send it ? I didn't really try the package yet, but I ran the tests: $ make test python242 setup.py build_ext -i running build_ext python242 test.py -p -v 230/302 ( 76.2%): Doctest: extensions.txt ---------------------------------------------------------------------- Ran 230 tests in 1.594s OK Is it really normal to run only 230 of them ? Additional info: this is a G5 machine running OS X.4, with a fink (http:// fink.sourceforge.net) install on top of the base system $ xslt-config --version 1.1.14 I wonder if the egg could be used on a vanilla OSX machine (dynamic libs?). Here's what I've got from fink: $ ls /sw/lib/libxml2.* /sw/lib/libxml2.2.6.20.dylib /sw/lib/libxml2.dylib /sw/lib/libxml2.2.dylib /sw/lib/libxml2.la /sw/lib/libxml2.a --------- Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73

Georges Racinet wrote:
That's odd, I get 362 out of 434 on my machine. python test.py -p -v 362/434 ( 83.4%): Doctest: extensions.txt ---------------------------------------------------------------------- Ran 362 tests in 0.773s Possibly your test runner is picking up an older lxml installed into your site-packages that's picked up before the one src, and running those tests? Regards, Martijn

Stefan Behnel wrote:
*slaps forehead* Heh, forgot all about that! Okay, next question about this egg: I expect it will only work on Mac OS X with fink, not vanilla Mac OS X as these have libxml2 libraries that are too old, I think. Can we do something about that? I guess it needs someone with a lot of insights in eggs and the like, but it doesn't sound hopeful. Regards, Martijn

Martijn Faassen a écrit :
You mean embedding or statically linking the required version of libxml2 and libxslt inside the egg? That might be a good idea for both MacOSX and Windows. How can we do that with distutils/setuptools? -- Olivier

Martijn Faassen wrote:
The easiest way to do this, by far, is to compile static libraries and make sure you link against those by fiddling with library_dirs. I'm pretty sure that Phillip recently added some capabilities to setuptools to store dynamic libraries in eggs as well, but I don't recall the details. -- Robert Kern robert.kern@gmail.com "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

On Mar 21, 2006, at 2:17 PM, Martijn Faassen wrote:
Thanks, I installed elementtree-1.2.6_20050316-py2.4.egg and the 362 tests ran fine.
Well actually the install contains the full path to used libs, so my egg is really for fink users. I got this in tests after moving fink libs away: ImportError: Failure linking new module: /Users/Shared/PythonLibs/ lxml-0.9/src/lxml/etree.so: Library not loaded: /sw/lib/libxml2.2.dylib Referenced from: /Users/Shared/PythonLibs/lxml-0.9/src/lxml/ etree.so Reason: image not found from http://www.explain.com.au/oss/libxml2xslt.html:
Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73

On Mar 21, 2006, at 4:07 PM, Martijn Faassen wrote:
I tried with the system's libxslt, and unfortunately got 2 failures in tests:
--------- Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73

Georges Racinet wrote:
You're on Tiger, I assume?
Hmm, it's unfortunate I used the literal error message in the doctest... That's just one error you got there, but it may mean two things: 1) it works, but the error message is different between different versions. 2) it doesn't work. I know, this is not very clean, but I changed the doctest in api.txt (SVN trunk) to not check the error message string returned by libxml2. The resulting error type is actually correct (the validation failed because of an element), but I guess the XML Schema validation code has changed a bit since that version. I attached the patch for the doctest. This solution means that we accept an older version of libxml2 than we normally should, but if it's only the XML Schema code that's outdated, then that may be acceptable. At least, we get a Mac-OS version of lxml that works with the default system libraries! Could you apply the patch and try again? (Note: if you run into problems with Pyrex or get "swig_sources" errors, please read INSTALL.txt) Thank you for the patience, Stefan

On Mar 21, 2006, at 4:57 PM, Stefan Behnel wrote:
I am.
I did, and the 362 of them now pass. Basic manual tests showed no problem either. I laid a new egg, where to put it ? --------- Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73

Georges Racinet wrote:
That's odd, I get 362 out of 434 on my machine. python test.py -p -v 362/434 ( 83.4%): Doctest: extensions.txt ---------------------------------------------------------------------- Ran 362 tests in 0.773s Possibly your test runner is picking up an older lxml installed into your site-packages that's picked up before the one src, and running those tests? Regards, Martijn

Stefan Behnel wrote:
*slaps forehead* Heh, forgot all about that! Okay, next question about this egg: I expect it will only work on Mac OS X with fink, not vanilla Mac OS X as these have libxml2 libraries that are too old, I think. Can we do something about that? I guess it needs someone with a lot of insights in eggs and the like, but it doesn't sound hopeful. Regards, Martijn

Martijn Faassen a écrit :
You mean embedding or statically linking the required version of libxml2 and libxslt inside the egg? That might be a good idea for both MacOSX and Windows. How can we do that with distutils/setuptools? -- Olivier

Martijn Faassen wrote:
The easiest way to do this, by far, is to compile static libraries and make sure you link against those by fiddling with library_dirs. I'm pretty sure that Phillip recently added some capabilities to setuptools to store dynamic libraries in eggs as well, but I don't recall the details. -- Robert Kern robert.kern@gmail.com "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

On Mar 21, 2006, at 2:17 PM, Martijn Faassen wrote:
Thanks, I installed elementtree-1.2.6_20050316-py2.4.egg and the 362 tests ran fine.
Well actually the install contains the full path to used libs, so my egg is really for fink users. I got this in tests after moving fink libs away: ImportError: Failure linking new module: /Users/Shared/PythonLibs/ lxml-0.9/src/lxml/etree.so: Library not loaded: /sw/lib/libxml2.2.dylib Referenced from: /Users/Shared/PythonLibs/lxml-0.9/src/lxml/ etree.so Reason: image not found from http://www.explain.com.au/oss/libxml2xslt.html:
Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73

On Mar 21, 2006, at 4:07 PM, Martijn Faassen wrote:
I tried with the system's libxslt, and unfortunately got 2 failures in tests:
--------- Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73

Georges Racinet wrote:
You're on Tiger, I assume?
Hmm, it's unfortunate I used the literal error message in the doctest... That's just one error you got there, but it may mean two things: 1) it works, but the error message is different between different versions. 2) it doesn't work. I know, this is not very clean, but I changed the doctest in api.txt (SVN trunk) to not check the error message string returned by libxml2. The resulting error type is actually correct (the validation failed because of an element), but I guess the XML Schema validation code has changed a bit since that version. I attached the patch for the doctest. This solution means that we accept an older version of libxml2 than we normally should, but if it's only the XML Schema code that's outdated, then that may be acceptable. At least, we get a Mac-OS version of lxml that works with the default system libraries! Could you apply the patch and try again? (Note: if you run into problems with Pyrex or get "swig_sources" errors, please read INSTALL.txt) Thank you for the patience, Stefan

On Mar 21, 2006, at 4:57 PM, Stefan Behnel wrote:
I am.
I did, and the 362 of them now pass. Basic manual tests showed no problem either. I laid a new egg, where to put it ? --------- Georges Racinet Nuxeo SAS gracinet@nuxeo.com http://nuxeo.com Tel: +33 (0) 1 40 33 71 73
participants (5)
-
Georges Racinet
-
Martijn Faassen
-
Olivier Grisel
-
Robert Kern
-
Stefan Behnel