]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: Check for Python 2.6 or newer
authorJoshua Lock <josh@linux.intel.com>
Tue, 8 Jun 2010 13:50:54 +0000 (14:50 +0100)
committerJoshua Lock <josh@linux.intel.com>
Tue, 8 Jun 2010 16:29:46 +0000 (17:29 +0100)
In relocatable.bbclass and utility-tasks.bbclass we depend on functionality
that was only introduced with Pytrhon 2.6, so we now check that the build
system has it in the sanity class.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/classes/sanity.bbclass

index 8ed8975edd0676bcf3dab1727c1d12e9cf6a2a59..02fa6435c042fecc40cf12a2d28f7016a26a3824 100644 (file)
@@ -43,6 +43,12 @@ def check_sanity(e):
 
        messages = ""
 
+       # Check the Python version, we now use Python 2.6 features in
+       # various classes
+       import sys
+       if sys.hexversion < 0x020600F0:
+               messages = messages + 'Poky requires at least Python 2.6 to run. Please update your Python interpreter.\n'
+
        if (LooseVersion(__version__) < LooseVersion(minversion)):
                messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)