Summary: | dev-python/pyside-1.1.0: Fails tests with "No module named py3kcompat" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Aaron Bauman (RETIRED) <bman> |
Component: | New packages | Assignee: | Markos Chandras (RETIRED) <hwoarang> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | qt |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 401789 | ||
Attachments: |
pyside test failure
emerge log build log an ebuild patch |
Description
Aaron Bauman (RETIRED)
2012-02-11 01:02:01 UTC
test 257 of 398 fails. All other dev-python/pyside ebuilds are currently masked. build.log, and emerge -av pyside please. What other pyside ebuilds are masked? 1.1.0 is the latest Created attachment 301519 [details]
emerge log
emerge log showing 1.1.0 as the latest as all others are masked.
Created attachment 301523 [details]
build log
Thanks. I will have a look testing tests # /usr/bin/python2.7 /var/tmp/portage/dev-python/pyside-1.1.0/work/pyside-qt4.7+1.1.0/tests/QtGui/pyside_reload_test.py Traceback (most recent call last): File "/var/tmp/portage/dev-python/pyside-1.1.0/work/pyside-qt4.7+1.1.0/tests/QtGui/pyside_reload_test.py", line 5, in <module> import py3kcompat as py3k ImportError: No module named py3kcompat This seems to be the actual error hmm; on attempting to replicate, couldn't pyside_reload_test.py is still the test that fails, however, on two gentoos, one stable; localhost idella # find /var/tmp/portage/portage/dev-python/pyside-1.1.0/work/ -name py3kcompat.py /var/tmp/portage/portage/dev-python/pyside-1.1.0/work/pyside-qt4.7+1.1.0/tests/util/py3kcompat.py It exists. The file py3kcompat.py is the module cited in the build log. The flaw I found was different, no value citing it here though. What is needed is the LastTest.log $PORTAGE_TMPDIR/portage/dev-python/pyside-1.1.0/work/pyside-1.1.0_build/Testing/Temporary/LastTest.log. The build log doesn't provide the required info. Created attachment 302993 [details, diff]
an ebuild patch
This is a comprehensive fix
I don't understand the patch The failing test is trying to do this: 1. create a test module (by copying a template) 2. import it 3. modify the test module file (appending a line to it) 4. remove the .pyc file 5. reload the module (using the reload() builtin) Normally step 2 generates a .pyc file, which the test removes to make sure step 5 uses the new code. When the test suite runs under emerge PYTHONDONTWRITEBYTECODE is set (because bytecode generation is usually not desirable here), so the .pyc file is not generated, and step 4 fails. At least that is what idella4 and me are seeing (the patch was cooked up collaboratively in #gentoo-python). Two obvious fixes exist: ignore failure to remove a nonexistant .pyc file, or re-enable bytecode writing. The patch takes the latter approach, as it is slightly simpler and does not mess with upstream code to make it work in the (non-standard) ebuild environment. I would prefer to commit this as it fixes a problem I can actually reproduce. I think the problem you're seeing is caused by trying to run the failing test directly: the build system normally adds ${CMAKE_SOURCE_DIR}/tests/util to PYTHONPATH, which is the directory py3kcompat.py is in. Thanks for the detailed explanation. Patch applied |