diff options
-rw-r--r-- | meta/classes/base.bbclass | 6 | ||||
-rw-r--r-- | meta/conf/bitbake.conf | 3 | ||||
-rwxr-xr-x | scripts/oe-buildenv-internal | 11 |
3 files changed, 9 insertions, 11 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index df11c8b270..57b69492ce 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -128,6 +128,12 @@ def setup_hosttools_dir(dest, toolsvar, d, fatal=True): | |||
128 | os.symlink(srctool, desttool) | 128 | os.symlink(srctool, desttool) |
129 | else: | 129 | else: |
130 | notfound.append(tool) | 130 | notfound.append(tool) |
131 | # Force "python" -> "python2" | ||
132 | desttool = os.path.join(dest, "python") | ||
133 | if not os.path.exists(desttool): | ||
134 | srctool = "python2" | ||
135 | os.symlink(srctool, desttool) | ||
136 | |||
131 | if notfound and fatal: | 137 | if notfound and fatal: |
132 | bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound)) | 138 | bb.fatal("The following required tools (as specified by HOSTTOOLS) appear to be unavailable in PATH, please install them in order to proceed:\n %s" % " ".join(notfound)) |
133 | 139 | ||
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 93aee1ae46..dcf2007883 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf | |||
@@ -476,12 +476,13 @@ export PATH | |||
476 | HOSTTOOLS_DIR = "${TMPDIR}/hosttools" | 476 | HOSTTOOLS_DIR = "${TMPDIR}/hosttools" |
477 | 477 | ||
478 | # Tools needed to run builds with OE-Core | 478 | # Tools needed to run builds with OE-Core |
479 | # python is special cased to point at python2 | ||
479 | HOSTTOOLS += " \ | 480 | HOSTTOOLS += " \ |
480 | [ ar as awk basename bash bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \ | 481 | [ ar as awk basename bash bzip2 cat chgrp chmod chown chrpath cmp comm cp cpio \ |
481 | cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \ | 482 | cpp cut date dd diff diffstat dirname du echo egrep env expand expr false \ |
482 | fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \ | 483 | fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \ |
483 | head hostname id install ld ldd ln ls make makeinfo md5sum mkdir mknod \ | 484 | head hostname id install ld ldd ln ls make makeinfo md5sum mkdir mknod \ |
484 | mktemp mv nm objcopy objdump od patch perl pod2man pr printf pwd python python2 \ | 485 | mktemp mv nm objcopy objdump od patch perl pod2man pr printf pwd python2 \ |
485 | python2.7 python3 ranlib readelf readlink rm rmdir rpcgen sed sh sha256sum \ | 486 | python2.7 python3 ranlib readelf readlink rm rmdir rpcgen sed sh sha256sum \ |
486 | sleep sort split stat strings strip tail tar tee test touch tr true uname \ | 487 | sleep sort split stat strings strip tail tar tee test touch tr true uname \ |
487 | uniq wc wget which xargs \ | 488 | uniq wc wget which xargs \ |
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 | |||
40 | return 1 | 40 | return 1 |
41 | fi | 41 | fi |
42 | 42 | ||
43 | # Make sure we're not using python v3.x as 'python', we don't support it. | 43 | py_v27_check=$(python2 -c 'import sys; print sys.version_info >= (2,7,3)') |
44 | py_v2_check=$(/usr/bin/env python --version 2>&1 | grep "Python 3") | ||
45 | if [ -n "$py_v2_check" ]; then | ||
46 | echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3." | ||
47 | echo >&2 "Please set up python v2 as your default 'python' interpreter." | ||
48 | return 1 | ||
49 | fi | ||
50 | unset py_v2_check | ||
51 | |||
52 | py_v27_check=$(python -c 'import sys; print sys.version_info >= (2,7,3)') | ||
53 | if [ "$py_v27_check" != "True" ]; then | 44 | if [ "$py_v27_check" != "True" ]; then |
54 | echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3." | 45 | echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3." |
55 | echo >&2 "Please upgrade your python v2." | 46 | echo >&2 "Please upgrade your python v2." |