diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-15 07:49:54 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:33 +0100 |
commit | 51864054da77830d95b3e7843e0955507d7b77ba (patch) | |
tree | 21871aa5f00ed0a9914d86549a729de6bdccc91b /bitbake | |
parent | c04cee7ce8fedb4ff947039ebf9357e28c06bba7 (diff) | |
download | poky-51864054da77830d95b3e7843e0955507d7b77ba.tar.gz |
Move the python version check before the module imports, in case the modules utilize the newer python features
(Bitbake rev: 87c15dfcbeb10e7cafb14726209e4954671b3dbe)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 805d60102f..7c1eb5f75a 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -22,10 +22,16 @@ | |||
22 | # with this program; if not, write to the Free Software Foundation, Inc., | 22 | # with this program; if not, write to the Free Software Foundation, Inc., |
23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 23 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
24 | 24 | ||
25 | import sys, os, optparse | 25 | import sys |
26 | if sys.hexversion < 0x020600F0: | ||
27 | print "Sorry, python 2.6 or later is required for this version of bitbake" | ||
28 | sys.exit(1) | ||
29 | |||
30 | import os | ||
26 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), | 31 | sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), |
27 | 'lib')) | 32 | 'lib')) |
28 | 33 | ||
34 | import optparse | ||
29 | import warnings | 35 | import warnings |
30 | import bb | 36 | import bb |
31 | import bb.msg | 37 | import bb.msg |
@@ -37,9 +43,6 @@ from bb.server import none | |||
37 | 43 | ||
38 | __version__ = "1.9.0" | 44 | __version__ = "1.9.0" |
39 | 45 | ||
40 | if sys.hexversion < 0x020600F0: | ||
41 | print "Sorry, python 2.6 or later is required for this version of bitbake" | ||
42 | sys.exit(1) | ||
43 | 46 | ||
44 | 47 | ||
45 | #============================================================================# | 48 | #============================================================================# |