diff options
| author | Joshua Lock <josh@linux.intel.com> | 2012-04-05 10:56:43 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-11 00:04:41 +0100 |
| commit | e5a63fd66b7855e0c9cafb788d95294e1b06ba58 (patch) | |
| tree | 7d6a736a8e9dbad87164ab2e145fe00da2a3368a | |
| parent | 0d001e8c04d78cbeecebd1f4439a9ae7db300e3f (diff) | |
| download | poky-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>
| -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__)))) |
