On 10/30/14, 7:39 AM, Burton, Ross wrote:
On 29 October 2014 13:18, Martin Hundebøll <[email protected]
<mailto:[email protected]>> 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



--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to