From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [RFC 1/2] scripts: use python2 explicitly in shebangs
Date: Thu, 30 Oct 2014 08:06:38 -0500 [thread overview]
Message-ID: <545237DE.9040305@windriver.com> (raw)
In-Reply-To: <CAJTo0Lb0H8X1Ycr0h=KhnT3k=xVGBcG=+sAu0upx9WfizbSTDg@mail.gmail.com>
On 10/30/14, 7:39 AM, Burton, Ross wrote:
> On 29 October 2014 13:18, Martin Hundebøll <martin@hundeboll.net
> <mailto:martin@hundeboll.net>> wrote:
>
> I used to use a virtualenv to temporarily set Python 2 as the default
> for the shell in which I ran bitbake commands. That was a while ago
> though, all my current builds are running on Ubuntu 12.04/14.04 server
> instances which I access via ssh from my Arch Linux box.
>
>
> Using a compatible distro-install is of course the easiest way to get going.
> Could also work with a virtual machine.
>
>
> Paul meant the Python tool virtualenv,
> http://virtualenv.readthedocs.org/en/latest/virtualenv.html. This can be used
> to create an environment where "python" on the search path is python 2, on a
> system where /usr/bin/ is python 3.
>
> I admit that I'm leaning towards thinking that we just say bitbake requires
> "python" to be 2.7+ and if your host distribution uses python 3 by default, use
> virtualenv. The logic being added to the V2 series to generate symlinks and
> drop them into the bitbake source tree isn't very elegant.
>
> Obviously using virtualenv means you need to use /usr/bin/env in the shebangs,
> so that part of the series is still needed.
Everything should be using the /usr/bin/env python mechanism. So that is correct.
For Yocto Project's poky, we've already said that python 2.7.3 or newer (and not
3) is required. If your system doesn't have this you can download the
buildtools-tarball 'sdk', install that and source it first.
No need for third party things like virtualenv, we already provide the capabilities!
(And since this is oe-core, the components to build the special
buildtools-tarball SDK are available in the tree.. just build it on a supported
python 2.7.x machine and re-use it on a python3 machine.)
--Mark
> Ross
>
>
next prev parent reply other threads:[~2014-10-30 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 11:18 [RFC 0/2] Explicit use of python 2 Martin Hundebøll
2014-10-29 11:18 ` [RFC 1/2] scripts: use python2 explicitly in shebangs Martin Hundebøll
2014-10-29 13:05 ` Paul Barker
2014-10-29 13:18 ` Martin Hundebøll
2014-10-30 12:39 ` Burton, Ross
2014-10-30 13:06 ` Mark Hatle [this message]
2014-10-29 11:18 ` [RFC 2/2] meta: rm __pycache__ in glib.inc::do_install_append() Martin Hundebøll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545237DE.9040305@windriver.com \
--to=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox