summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2016-05-05 02:32:54 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-16 22:32:39 (GMT)
commit93925f7875197e08b9e91019096c196bac2f0e3f (patch)
treeccbaa4d3b830b1be427ded1259ace80ebcbe706c
parent9094ea9fdd1f23cbc9f7a9d0d95fb330c5ea8906 (diff)
downloadpoky-93925f7875197e08b9e91019096c196bac2f0e3f.tar.gz
scripts/oe-buildenv-internal: allow experimental python3 support
(From OE-Core rev: 06b91103915f73d5b5b2001f76874c73f1d88007) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/oe-buildenv-internal12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
index e04db03..55358fb 100755
--- a/scripts/oe-buildenv-internal
+++ b/scripts/oe-buildenv-internal
@@ -35,17 +35,19 @@ fi
35# can offer a meaningful error message. 35# can offer a meaningful error message.
36py_v3_check=$(/usr/bin/env python --version 2>&1 | grep "Python 3") 36py_v3_check=$(/usr/bin/env python --version 2>&1 | grep "Python 3")
37if [ -n "$py_v3_check" ]; then 37if [ -n "$py_v3_check" ]; then
38 echo >&2 "Bitbake is not compatible with python v3" 38 #echo >&2 "Bitbake is not compatible with python v3"
39 echo >&2 "Please set up python v2 as your default python interpreter" 39 #echo >&2 "Please set up python v2 as your default python interpreter"
40 return 1 40 #return 1
41 echo >&2 "Experimental python v3 support"
42 py_v3="True"
41fi 43fi
42unset py_v3_check 44unset py_v3_check
43 45
44# Similarly, we now have code that doesn't parse correctly with older 46# Similarly, we now have code that doesn't parse correctly with older
45# versions of Python, and rather than fixing that and being eternally 47# versions of Python, and rather than fixing that and being eternally
46# vigilant for any other new feature use, just check the version here. 48# vigilant for any other new feature use, just check the version here.
47py_v26_check=$(python -c 'import sys; print sys.version_info >= (2,7,3)') 49py_v26_check=$(python -c 'import sys; print(sys.version_info >= (2,7,3))')
48if [ "$py_v26_check" != "True" ]; then 50if [ "$py_v26_check" != "True" ] && [ "$py_v3" != "True" ]; then
49 echo >&2 "BitBake requires Python 2.7.3 or later" 51 echo >&2 "BitBake requires Python 2.7.3 or later"
50 return 1 52 return 1
51fi 53fi