From 214d1f7433fd8571c3e0920624ce07f31c7f08c9 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 15 Apr 2010 08:45:15 -0700 Subject: Move the python version check into the python package This ensures the check is run for anyone using the package, including setup.py, though it's sad that it's necessary, since all it really wants is __version__. Ideally, we'd avoid the version check entirely in favor of checking for functionality, but that's rather difficult with language constructs like context managers, so this'll do for now. (Bitbake rev: f936f1c0edf70860ea0f39ec1a500ba43b56f289) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index bf2f35a73..e4a970c64 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py @@ -23,6 +23,10 @@ __version__ = "1.11.0" +import sys +if sys.version_info < (2, 6, 0): + raise RuntimeError("Sorry, python 2.6.0 or later is required for this version of bitbake") + import os import bb.msg -- cgit v1.2.3