bitbake wrapper: exit if python v3 is detected
cover bitbake wrapper: exit if python v3 is detected
Make sure we're not using python v3.x. This check can't go into sanity.bbclass because bitbake's source code doesn't even pass parsing stage when used with python v3, so we catch it here so we can offer a meaningful error message.
This fixes bug [YOCTO #1128]
I did attempt to make changes to bitbake to get the source code to parse under python v3, but there are issues which make it too difficult to get the code to work with python v2 and v3. For example, importing modules within a package has changed significantly in v3 in such a way that breaks compatability with v2.
The following changes since commit 7aa7673459376aff911cef820c9417c998d1aa96:
meta-yocto/linux-yocto: update to match the renamed linux-yocto recipes (2011-06-14 09:21:32 -0700)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib sgarman/bb-python-v3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/bb-python-v3
Scott Garman (1):
bitbake wrapper: exit if python v3 is detected
scripts/bitbake | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
PATCH 1/1 bitbake wrapper: exit if python v3 is detected
Make sure we're not using python v3.x. This check can't go into sanity.bbclass because bitbake's source code doesn't even pass parsing stage when used with python v3, so we catch it here so we can offer a meaningful error message.
This fixes bug [YOCTO #1128]
--- scripts/bitbake | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
scripts/bitbake +11 -0
@@ -16,6 +16,17 @@ done [ $needpseudo = "0" ] && break done +# Make sure we're not using python v3.x. This check can't go into +# sanity.bbclass because bitbake's source code doesn't even pass +# parsing stage when used with python v3, so we catch it here so we +# can offer a meaningful error message. +py_v3_check=`/usr/bin/env python --version 2>&1 | grep "Python 3"` +if [ "$py_v3_check" != "" ]; then + echo "Bitbake is not compatible with python v3" + echo "Please set up python v2 as your default python interpreter" + exit 1 +fi + needtar="1" TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` float_test() {
Signature · 1 line
1.7.1
Quoted 5 lines · Scott Garman
Make sure we're not using python v3.x. This check can't go into sanity.bbclass because bitbake's source code doesn't even pass parsing stage when used with python v3, so we catch it here so we can offer a meaningful error message.
Quoted 7 lines
This fixes bug [YOCTO #1128]
I did attempt to make changes to bitbake to get the source code to parse under python v3, but there are issues which make it too difficult to get the code to work with python v2 and v3. For example, importing modules within a package has changed significantly in v3 in such a way that breaks compatability with v2.
Ping?
Scott
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center
Op 27 jun 2011, om 22:01 heeft Scott Garman het volgende geschreven:
Quoted 8 lines · Scott Garman
Quoted 7 lines
Make sure we're not using python v3.x. This check can't go into sanity.bbclass because bitbake's source code doesn't even pass parsing stage when used with python v3, so we catch it here so we can offer a meaningful error message.
This fixes bug [YOCTO #1128]
Quoted 7 lines
Quoted 5 lines
I did attempt to make changes to bitbake to get the source code to parse under python v3, but there are issues which make it too difficult to get the code to work with python v2 and v3. For example, importing modules within a package has changed significantly in v3 in such a way that breaks compatability with v2.
Ping?
Try posting it on the OE-core list?
Richard Purdie
AppliedQuoted 15 lines · Scott Garman
Make sure we're not using python v3.x. This check can't go into sanity.bbclass because bitbake's source code doesn't even pass parsing stage when used with python v3, so we catch it here so we can offer a meaningful error message.
This fixes bug [YOCTO #1128]
I did attempt to make changes to bitbake to get the source code to parse under python v3, but there are issues which make it too difficult to get the code to work with python v2 and v3. For example, importing modules within a package has changed significantly in v3 in such a way that breaks compatability with v2.
The following changes since commit
7aa7673459376aff911cef820c9417c998d1aa96:
Quoted 8 lines
meta-yocto/linux-yocto: update to match the renamed linux-yocto recipes (2011-06-14 09:21:32 -0700)
are available in the git repository at:
git://git.pokylinux.org/poky-contribsgarman/bb-python-v3
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/bb-python-v3Scott Garman (1):
bitbake wrapper: exit if python v3 is detected
Merged to master but please send OE-Core related patches to the OE-Core list in future.
Cheers,
Richard