Attempting to use a python-written application (pyroom) that makes use of pygtksourceview failed with an import error (No such module gtksourceview). Error also shows if you just try to import gtksourceview in a commandline python environment. Obviously, pygtksourceview itself is installed, but I was using xfce4 only. Upon installing gnome (following a hunch based on other reported pygtksourceview issues, although those were old postings) it now works perfectly. Reproducible: Always Steps to Reproduce: 1. Install Gentoo base system (follow the handbook!) and get up to date. 2. emerge xorg-x11 and set up for use. 3. emerge xfce4 4. While logged into an xfce4 session, emerge pygtksourceview 5. $ python >>> import gtksourceview Error reported: No module gtksourceview found 6. emerge gnome (not necessary to log out and into a gnome session) 7. $ python >>> import gtksourceview >>> (ie: success) This was a very slow machine so it took days to confirm this test. I could attempt to do so again on a virtual machine in vmware (hosted on a faster machine). Actual Results: gtksourceview module (before gnome is installed) could not be found by python. btw: import gtksourceview2 doesn't return an error but also doesn't seem to result in objects that applications coded for it can use. Expected Results: python module gtksourceview should be importable and usable when pygtksourceview is installed, but gnome isn't. rachel@abatwa ~ $ emerge --info Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686) ================================================================= System uname: 2.6.24-gentoo-r8 i686 VIA Samuel 2 Timestamp of tree: Tue, 20 May 2008 08:46:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r9, 2.5.2-r3 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="x86" CBUILD="i586-pc-linux-gnu" CFLAGS="-march=i586 -m3dnow -mmmx -Os -pipe -fomit-frame-pointer" CHOST="i586-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=i586 -m3dnow -mmmx -Os -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.virginmedia.com/ " LINGUAS="en_GB en_US en" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" 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" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X acl acpi avahi bash-completion berkdb cli cracklib crypt dbus dri fortran gdbm gnome gpm gtk hal iconv ipv6 isdnlog java libnotify midi mudflap ncurses nls nptl nptlonly nsplugin openmp pam pcre perl pppd python readline reflection session spl ssl startup-notification tcpd tk unicode vim-syntax x86 xorg xulrunner zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en_US en" USERLAND="GNU" VIDEO_CARDS="trident" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
The version of pygtksourceview that *works* is the one brought in as part of dev-python/gnome-python-desktop. It installs /usr/lib/python${ver}/site-packages/gtk-2.0/gtksourceview.{la,so}. Why is this distinct from the modules installed in dev-python/pygtksourceview? is that some completely different thing with the same name? Is it not possible to have a working gtksourceview for python that isn't dependent on bringing in large swathes of gnome?
pygtksourceview provide bindings for gtksourceview-2 if your app doesn't work with this version then its deps are screwed. gnome-python-desktop will be splitted soonish but it'll take time if you want to see it land in stable.
marking invalid because the app isn't actually in portage.