Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 403061 - dev-python/pyside-1.1.0: Fails tests with "No module named py3kcompat"
Summary: dev-python/pyside-1.1.0: Fails tests with "No module named py3kcompat"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 401789
  Show dependency tree
 
Reported: 2012-02-11 01:02 UTC by Aaron Bauman (RETIRED)
Modified: 2012-02-23 18:56 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pyside test failure (pysidetestfailure,339.91 KB, text/plain)
2012-02-11 01:02 UTC, Aaron Bauman (RETIRED)
Details
emerge log (pysideemerge,591 bytes, text/plain)
2012-02-11 01:26 UTC, Aaron Bauman (RETIRED)
Details
build log (build.log,154.82 KB, text/plain)
2012-02-11 01:34 UTC, Aaron Bauman (RETIRED)
Details
an ebuild patch (pyside.patch,452 bytes, patch)
2012-02-23 17:54 UTC, Ian Delaney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Bauman (RETIRED) gentoo-dev 2012-02-11 01:02:01 UTC
Created attachment 301513 [details]
pyside test failure

Portage 2.1.10.44 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.5 x86_64)
    =================================================================
    System uname: Linux-3.2.5-x86_64-Intel-R-_Core-TM-_i5-2450M_CPU_@_2.50GHz-with-gentoo-2.0.3
    Timestamp of tree: Fri, 10 Feb 2012 23:15:01 +0000
    app-shells/bash:          4.1_p9
    dev-lang/python:          2.7.2-r3, 3.1.4-r3
    dev-util/cmake:           2.8.6-r4
    dev-util/pkgconfig:       0.26
    sys-apps/baselayout:      2.0.3
    sys-apps/openrc:          0.9.8.4
    sys-apps/sandbox:         2.5
    sys-devel/autoconf:       2.68
    sys-devel/automake:       1.11.1
    sys-devel/binutils:       2.21.1-r1
    sys-devel/gcc:            4.5.3-r1
    sys-devel/gcc-config:     1.4.1-r1
    sys-devel/libtool:        2.4-r1
    sys-devel/make:           3.82-r1
    sys-kernel/linux-headers: 3.1 (virtual/os-headers)
    sys-libs/glibc:           2.13-r4
    Repositories: gentoo kde
    ACCEPT_KEYWORDS="amd64"
    ACCEPT_LICENSE="*"
    CBUILD="x86_64-pc-linux-gnu"
    CFLAGS="-march=native -O2 -pipe"
    CHOST="x86_64-pc-linux-gnu"
    CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
    CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
    CXXFLAGS="-march=native -O2 -pipe"
    DISTDIR="/usr/portage/distfiles"
    FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles multilib-strict news parallel-fetch protect-owned sandbox sfperms split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
    FFLAGS=""
    GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/"
    LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
    MAKEOPTS="-j5"
    PKGDIR="/usr/portage/packages"
    PORTAGE_CONFIGROOT="/"
    PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
    PORTAGE_TMPDIR="/var/tmp"
    PORTDIR="/usr/portage"
    PORTDIR_OVERLAY="/var/lib/layman/kde"
    SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
    USE="/ X acl acpi alsa amd64 apng berkdb bzip2 cdr cli consolekit cracklib crypt cups cxx dbus declarative dri dvd dvdr ffmpeg fortran gd gdbm gpm gtk gudev iconv ipv6 jpeg jpeg2k kde mmx mng modules mudflap multilib mysql ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf php png policykit ppds pppd python qt3support qt4 readline script semantic-desktop session sql sqlite sse sse2 ssl svg sysfs taglib tcpd tiff truetype udev unicode v4l vorbis webkit xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
    Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Aaron Bauman (RETIRED) gentoo-dev 2012-02-11 01:03:45 UTC
test 257 of 398 fails.  All other dev-python/pyside ebuilds are currently masked.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2012-02-11 01:09:48 UTC
build.log, and emerge -av pyside please. What other pyside ebuilds are masked? 1.1.0 is the latest
Comment 3 Aaron Bauman (RETIRED) gentoo-dev 2012-02-11 01:26:32 UTC
Created attachment 301519 [details]
emerge log

emerge log showing 1.1.0 as the latest as all others are masked.
Comment 4 Aaron Bauman (RETIRED) gentoo-dev 2012-02-11 01:34:22 UTC
Created attachment 301523 [details]
build log
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2012-02-11 10:29:51 UTC
Thanks. I will have a look
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2012-02-11 10:53:22 UTC
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
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2012-02-22 16:55:39 UTC
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.
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2012-02-23 17:54:57 UTC
Created attachment 302993 [details, diff]
an ebuild patch

This is a comprehensive fix
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-02-23 18:13:53 UTC
I don't understand the patch
Comment 10 Marien Zwart (RETIRED) gentoo-dev 2012-02-23 18:40:48 UTC
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.
Comment 11 Markos Chandras (RETIRED) gentoo-dev 2012-02-23 18:56:12 UTC
Thanks for the detailed explanation. Patch applied