[OE-core] [RFC 1/2] scripts: use python2 explicitly in shebangs

Burton, Ross ross.burton at intel.com
Thu Oct 30 12:39:55 UTC 2014


On 29 October 2014 13:18, Martin Hundebøll <martin at 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.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20141030/4e491706/attachment-0002.html>


More information about the Openembedded-core mailing list