diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-30 11:18:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-06 12:14:05 +0000 |
commit | b06a6cde5c5503f456f260c773cf126085e18c8d (patch) | |
tree | 3c9f12f6dbdcebb020309986906d91bc6274d5c6 /scripts/oe-buildenv-internal | |
parent | a13e088942e2a3c3521e98954a394e61a15234e8 (diff) | |
download | openembedded-core-contrib-b06a6cde5c5503f456f260c773cf126085e18c8d.tar.gz |
oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS manipulation
Several distros are now shipping "python" as python v3 contra to the original
python guidelines. This causes users confusion/pain in trying to use our tools.
We can just force "python" to "python2" within HOSTTOOLS to avoid this issue
and hide the complexity from the user.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-buildenv-internal')
-rwxr-xr-x | scripts/oe-buildenv-internal | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal index 6773872326..52ce32987c 100755 --- a/scripts/oe-buildenv-internal +++ b/scripts/oe-buildenv-internal @@ -40,16 +40,7 @@ if [ -z "$OE_SKIP_SDK_CHECK" ] && [ -n "$OECORE_SDK_VERSION" ]; then return 1 fi -# Make sure we're not using python v3.x as 'python', we don't support it. -py_v2_check=$(/usr/bin/env python --version 2>&1 | grep "Python 3") -if [ -n "$py_v2_check" ]; then - echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3." - echo >&2 "Please set up python v2 as your default 'python' interpreter." - return 1 -fi -unset py_v2_check - -py_v27_check=$(python -c 'import sys; print sys.version_info >= (2,7,3)') +py_v27_check=$(python2 -c 'import sys; print sys.version_info >= (2,7,3)') if [ "$py_v27_check" != "True" ]; then echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3." echo >&2 "Please upgrade your python v2." |