diff options
Diffstat (limited to 'bitbake/lib/bb')
-rwxr-xr-x | bitbake/lib/bb/ui/hob.py | 11 |
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 | ||
23 | import sys | 23 | import sys |
24 | import os | 24 | import os |
25 | requirements = "FATAL: pygtk (version 2.22.0 or later) and pygobject are required to use Hob" | 25 | requirements = "FATAL: Gtk+, PyGtk and PyGobject are required to use Hob" |
26 | try: | 26 | try: |
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)))) | ||
34 | except ImportError as exc: | 37 | except ImportError as exc: |
35 | sys.exit("%s (%s)." % (requirements, str(exc))) | 38 | sys.exit("%s (%s)." % (requirements, str(exc))) |
36 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) | 39 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) |