sanity.bbclass: Check for Python 2.6 or newer

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>
This commit is contained in:
Joshua Lock 2010-06-08 14:50:54 +01:00
parent 8f34dcfdbc
commit 6a9312cccc
1 changed files with 6 additions and 0 deletions

View 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__)