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 <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson authored and Richard Purdie committed 2010-07-02 15:41:34 +01:00
1 parent 231d3a534c
commit 214d1f7433
2 files changed
+5 -5

No files matched your search

+1 -5
View File
@@ -22,12 +22,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys
if sys.version_info < (2, 6, 0):
print "Sorry, python 2.6.0 or later is required for this version of bitbake"
sys.exit(1)
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])),
'lib'))
+4
View File
@@ -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