Created attachment 297669 [details] my emerge --info FEATURES test set; std use flags' FAILED (errors=1) * testwrite.py failed with PyPy 1.7 (Python 2.7) PYTHONPATH="../build-2.7-pypy-1.7/lib" pypy-c1.7 testxhtml.py .......... ---------------------------------------------------------------------- Ran 10 tests in 1.955s OK PYTHONPATH="../build-2.7-pypy-1.7/lib" pypy-c1.7 testxmlgen.py
Created attachment 297671 [details] the build log
shan't bother with a patch; this will do. diff -ur ../odfpy.orig/odfpy-0.9.4.ebuild ../odfpy/odfpy-0.9.4.ebuild --- ../odfpy.orig/odfpy-0.9.4.ebuild 2012-06-11 22:41:58.580465974 +0800 +++ ../odfpy/odfpy-0.9.4.ebuild 2012-06-11 22:22:40.931407732 +0800 @@ -25,7 +25,9 @@ src_prepare() { distutils_src_prepare - epatch "${FILESDIR}/${P}-tests.patch" + epatch "${FILESDIR}/${P}-tests.patch" \ + "${FILESDIR}/${P}-opendoc.patch" + } src_test() { ------------------------------------------------------------------------------- from https://bugs.pypy.org/issue1165; archtester odfpy # cat files/files/odfpy-0.9.4-opendoc.patch diff -ur odfpy-0.9.4.orig/odf/opendocument.py odfpy-0.9.4/odf/opendocument.py --- odf/opendocument.py 2011-12-15 03:05:07.000000000 +0800 +++ opendocument.py 2012-06-11 22:19:12.291397236 +0800 @@ -408,6 +408,7 @@ """ zipoutputfp = zipfile.ZipFile(outputfp,"w") self.__zipwrite(zipoutputfp) + zipoutputfp.close() def __zipwrite(self, outputfp): """ Write the document to an open file pointer yields * Testing of dev-python/odfpy-0.9.4 with CPython 2.6... * Running testchart.py ... * Testing of dev-python/odfpy-0.9.4 with PyPy 1.8 (Python 2.7)... * Running testchart.py ... * Testing of dev-python/odfpy-0.9.4 with PyPy 1.9 (Python 2.7)... * Running testchart.py ... OK * Running testxmlgen.py ... .... ---------------------------------------------------------------------- Ran 4 tests in 0.011s OK perfect score. Note this is a patch to odfpy itself, not to pypy This is a bug in odfpy, not in PyPy: in odf/opendocument.py line 409, in write(), the opened ZipFile is never close()d...................... You don't have this effect with PyPy. The fix is to add "zipoutputfp.close()" in the end of the write() method.
This bug can be closed, version 0.9.4 is no longer in portage, latest version 1.3.2 builds the tests just fine.