Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586256 - net-print/hplip-3.16.5-r1 ImportError: No module named gobject
Summary: net-print/hplip-3.16.5-r1 ImportError: No module named gobject
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL: https://github.com/gentoo/gentoo/pull...
Whiteboard:
Keywords:
: 591800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-06-18 06:10 UTC by Martux
Modified: 2016-12-12 23:23 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martux 2016-06-18 06:10:42 UTC
Calling hp-toolbox from the hplip package gives this error:

hp-toolbox 

HP Linux Imaging and Printing System (ver. 3.16.5)
HP Device Manager ver. 15.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 270, in <module>
    ui = import_module(ui_package + ".devmgr5")
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/share/hplip/ui5/devmgr5.py", line 35, in <module>
    from base import device, utils, pml, maint, models, pkit, os_utils
  File "/usr/share/hplip/base/pkit.py", line 40, in <module>
    import gobject
ImportError: No module named gobject
Comment 1 Martux 2016-06-18 06:10:58 UTC
emerge --info
Portage 2.3.0_rc1 (python 2.7.11-final-0, default/linux/amd64/13.0/desktop/plasma/systemd, gcc-5.4.0, glibc-2.23-r2, 4.6.2-gentoo x86_64)
=================================================================
System uname: Linux-4.6.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-6500U_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem:     8151100 total,   3570464 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 18 Jun 2016 05:00:02 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.4::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.21::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/env.d/43kdepaths /etc/env.d/99skype /usr/share/config /usr/share/config/kdm/kdmrc /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=8.0 --with-bdeps=y --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://tux.rainside.sk/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://gentoo.gg3.net/"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 asf avahi berkdb bluetooth bluray branding bzip2 cairo cdda cdr cli cracklib css cups custom-cflags custom-optimization cxx dbus declarative dri dts dvd dvdr ebook emboss encode exif fam ffmpeg firefox flac fortran gdbm gif glamor glib gpm hddtemp iconv icu id3tag java jpeg jpeg2k kde kipi lame lcms libnotify lzma mad matroska mmx mmxext mng modemmanager modules mp3 mp4 mpeg mtp multilib ncurses networkmanager nls nptl nsplugin ogg opencl opengl openmp pam pango pch pcre pdf phonon pic plasma png policykit ppds pulseaudio python3 qml qt3support qt5 quicktime readline samba sdl seccomp session slp smp spell sse sse2 ssl startup-notification svg symlink systemd taglib tcpd theora threads tiff truetype twolame udev udisks unicode usb v4l vaapi vcd vdpau vorbis wavpack widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid xvmc zeroconf zlib" ABI_X86="32 64" ALSA_CARDS="snd_hda_intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21 ruby23" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Martux 2016-06-18 06:14:57 UTC
Installed packages:
[ebuild   R    ] dev-python/pygobject-3.18.2 
[ebuild   R    ] net-print/hplip-3.16.5-r1::gentoo  USE="X hpcups kde (policykit) qt5 scanner snmp -doc -fax -hpijs -libusb0 -minimal -parport -qt4 -static-ppds" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_4 -python3_3
Comment 3 Martux 2016-06-19 21:00:50 UTC
I found it:
pygobjects is available in a slotted version, as pygobject:2 and pygobject:3.
I found that out by seeing if downgrading hplip would help (it didn't). After that, the latest version pulled in this:
dev-python/pygobject-2.28.6-r55:2::gentoo even the dev-python/pygobject-3.18.2:3::gentoo version was already installed. Now it works.
Please see this forum thread for reference:
https://forums.gentoo.org/viewtopic-t-1046706-start-0-postdays-0-postorder-asc-highlight-.html?sid=921edd68f02e9bb19cba1b6f41716ea1
Comment 4 Daniel Pielmeier gentoo-dev 2016-06-20 17:46:33 UTC
@python: Can you please help me out here. Recently I have added python 3 support to hplip. However I found no way to properly depend on the slotted dev-python/pygobject.

hplip uses the python-single-r1.eclass and requires dev-python/pygobject which is slotted. Slot 2 provides python 2 support (PyGTK) and slot 3 has python 3 support (PyGObject).

So what is the proper way to depend on this package depending on the value of PYTHON_SINGLE_TARGET?

It seems that dev-python/pygobject[${PYTHON_USEDEP}] is not sufficient.

Currently the dependencies below is what I came up with but I am sure there is a more elegant way.

python_single_target_python2_7? ( dev-python/pygobject:2[${PYTHON_USEDEP}] )
python_single_target_python3_3? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
python_single_target_python3_4? ( dev-python/pygobject:3[${PYTHON_USEDEP}] )
Comment 5 Michael Palimaka (kensington) gentoo-dev 2016-08-24 13:28:21 UTC
*** Bug 591800 has been marked as a duplicate of this bug. ***
Comment 6 klaus818 2016-08-24 16:51:19 UTC
I wrote another bugreport bevor I know, that this was a problem of hplip. I fixed this problem when I build hplip with qt4 -qt5.
Comment 7 Andreas Sturmlechner gentoo-dev 2016-12-12 23:22:55 UTC
Thanks for your report, fixed by commit 7f570c20cc58cc92c9ebdfdf8f6f5b618e8f75d4
Comment 8 Andreas Sturmlechner gentoo-dev 2016-12-12 23:23:13 UTC
Thanks for your report, fixed by commit 7f570c20cc58cc92c9ebdfdf8f6f5b618e8f75d4