summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rwxr-xr-xbitbake/lib/bb/ui/hob.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py
index 1321ebbac7..6cd9579633 100755
--- a/bitbake/lib/bb/ui/hob.py
+++ b/bitbake/lib/bb/ui/hob.py
@@ -22,15 +22,18 @@
22 22
23import sys 23import sys
24import os 24import os
25requirements = "FATAL: pygtk (version 2.22.0 or later) and pygobject are required to use Hob" 25requirements = "FATAL: Gtk+, PyGtk and PyGobject are required to use Hob"
26try: 26try:
27 import gobject 27 import gobject
28 import gtk 28 import gtk
29 import pygtk 29 import pygtk
30 pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?! 30 pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?!
31 ver = gtk.pygtk_version 31 gtkver = gtk.gtk_version
32 if ver < (2, 22, 0): 32 pygtkver = gtk.pygtk_version
33 sys.exit("%s (you have pygtk %s.%s.%s)." % (requirements, ver[0], ver[1], ver[2])) 33 if gtkver < (2, 18, 0) or pygtkver < (2, 16, 0):
34 sys.exit("%s,\nYou have Gtk+ %s and PyGtk %s." % (requirements,
35 ".".join(map(str, gtkver)),
36 ".".join(map(str, pygtkver))))
34except ImportError as exc: 37except ImportError as exc:
35 sys.exit("%s (%s)." % (requirements, str(exc))) 38 sys.exit("%s (%s)." % (requirements, str(exc)))
36sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) 39sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))