Patchwork [bitbake-devel,3/3] hob: update required versions of (py)gtk et al

login
register
mail settings
Submitter Joshua Lock
Date April 5, 2012, 6:29 p.m.
Message ID <4eb4b6236f3a6b082ccd1306de21e08037c86041.1333650445.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/25231/
State Accepted
Commit 5ccbcdf8c47f2f20655a3ea0f60e5870cdba6f83
Headers show

Comments

Joshua Lock - April 5, 2012, 6:29 p.m.
With the previous two changes we now work on Gtk+ 2.18 and PyGtk 2.16

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 lib/bb/ui/hob.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

Patch

diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 1321ebb..6cd9579 100755
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -22,15 +22,18 @@ 
 
 import sys
 import os
-requirements = "FATAL: pygtk (version 2.22.0 or later) and pygobject are required to use Hob"
+requirements = "FATAL: Gtk+, PyGtk and PyGobject are required to use Hob"
 try:
     import gobject
     import gtk
     import pygtk
     pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?!
-    ver = gtk.pygtk_version
-    if ver  < (2, 22, 0):
-        sys.exit("%s (you have pygtk %s.%s.%s)." % (requirements, ver[0], ver[1], ver[2]))
+    gtkver = gtk.gtk_version
+    pygtkver = gtk.pygtk_version
+    if gtkver  < (2, 18, 0) or pygtkver < (2, 16, 0):
+        sys.exit("%s,\nYou have Gtk+ %s and PyGtk %s." % (requirements,
+                ".".join(map(str, gtkver)),
+                ".".join(map(str, pygtkver))))
 except ImportError as exc:
     sys.exit("%s (%s)." % (requirements, str(exc)))
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))