summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-04-05 10:56:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 00:04:41 +0100
commite5a63fd66b7855e0c9cafb788d95294e1b06ba58 (patch)
tree7d6a736a8e9dbad87164ab2e145fe00da2a3368a /bitbake/lib
parent0d001e8c04d78cbeecebd1f4439a9ae7db300e3f (diff)
downloadpoky-e5a63fd66b7855e0c9cafb788d95294e1b06ba58.tar.gz
hob: update required versions of (py)gtk et al
With the previous two changes we now work on Gtk+ 2.18 and PyGtk 2.16 (Bitbake rev: 5ccbcdf8c47f2f20655a3ea0f60e5870cdba6f83) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-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__))))