Created attachment 347318 [details] a diff -u from cvs adding pypy support and there's a seg fault under running test.py. IUSE="doc examples test +threads test? ( !dev-python/elementtree )" This is what was causing the test fail for py2.6 2.7. The installed instance was found first by the test. Once removed, passes. einfo "Many tests not compatible to py3.1" elif [[ "${EPYTHON}" == 'pypy-c2.0' ]]; then for test in selftest.py selftest2.py; do skips test.py python_configure() { if [[ "${EPYTHON}" != python3* ]]; then append-flags -fno-strict-aliasing return append-flags -fno-strict-aliasing
see https://bugs.launchpad.net/lxml/+bug/1176283 #c3 Making the issue, combined with asking on #pypy, lead to learning of and acquiring lxml-cffi which is a dropin replacement for lxml. The package's maintainer could do with refining it in terms of deleting cython related content. As Mike observed, it lacks any release, though it has a version. 1. It requires the latest py2.0 beta2 for adequate compatibility. 2. That is atm bumped in portage and has some rough edges consequent to it having its own inbuilt cffi which is what the lxml-cffi package utilises to 'work' lxml in place of the cpython oriented cython. 3. Having filed "apparent regression in import in py2.0 b2" at pypy.org, we have "It's a regression in cffi I filed yesterday: https://bitbucket.org/cffi/cffi/issue/81/exported-variables-are-not-listed-in-dir" making for 2 rough edges, both consequent to it's new inbuilt cffi, making for Mike masking it, fair enough too. 4. So from the #c3 Well, all it means is that it may or may not work for a given code base, and there certainly is code that works with it. As long as no-one takes the time to investigate the remaining crash in the test suite, it'll just continue to be unclear what's wrong and how difficult or easy it would be to fix it. His current status is "I've done enough pypy devs ought sort it." That test.py, being a test, makes for pypy support for lxml main being underdone. The lxml-cffi is essentially a work in progress, and it's fairly close. amaury, a pypy maintainer and the maker of lxml-cffi, does appear active in pursuing these issues, and I'm inclined to think the interest expressed by me on behalf of gentoo is enough to make him hone it and make it production ready, so come on men tell amaury 'yes please more of the same'. Until then, floppym and radhermit, care to do a commit on the remaining couple of changes I submitted here now -fno-strict-aliasing has been done???
hmm; just found Here is a test fix that a) prefers the stdlib version over an externally installed ET and b) adapts the tests to also work with older versions of ET (i.e. it fixes the failures you showed). https://github.com/lxml/lxml/commit/a7853944dacbe12097c1ef15836caeffbab8396c https://github.com/lxml/lxml/commit/66549611ed4173457ddbb9565ee81eec32d71cc8. This makes an alternative to adding test to IUSE and "test? ( !dev-python/elementtree )"
(In reply to comment #2) I have already applied the first patch, and the second is unnecessary given the first.
I think this stuff has landed upstream by now.