[yocto] [PATCH] [yocto-autobuilder] init: Fix the import module yoctoabb & yocto_console_view

Chan, Aaron Chun Yew aaron.chun.yew.chan at intel.com
Tue Jul 10 19:23:53 PDT 2018


Hi Richard,

It appears that your using virtualenv (switch to python3) to startup your buildbot processes and not using the default python from host distribution.
I am aware that you can switch interpreter to python2/3 in virtualenv. Shouldn’t we handle these for both in events users uses
the default host distribution as default python2 and still make it worked? What is the best practices here and should all the buildbot-workers start in
virtualenv defaults to python3 as well ? I am little lost right here, please advise.

Cheers,
Aaron

Try using virtualenv:

$ python --version
Python 2.7.15rc1

$ virtualenv -p python3 test
Already using interpreter /usr/bin/python3 Using base prefix '/usr'
New python executable in /media/build1/test/bin/python3 Also creating executable in /media/build1/test/bin/python Installing setuptools, pkg_resources, pip, wheel...done.

$ . ./test/bin/activate

(test) richard at dax:/media/build1/$ python --version Python 3.6.5


If you start buildbot within the virtualenv, you should see it using python3.

Cheers,

Richard

-----Original Message-----
From: richard.purdie at linuxfoundation.org [mailto:richard.purdie at linuxfoundation.org] 
Sent: Wednesday, July 11, 2018 6:17 AM
To: Chan, Aaron Chun Yew <aaron.chun.yew.chan at intel.com>; yocto at yoctoproject.org; Burton, Ross <ross.burton at intel.com>; Eggleton, Paul <paul.eggleton at intel.com>
Subject: Re: [PATCH] [yocto-autobuilder] init: Fix the import module yoctoabb & yocto_console_view

On Tue, 2018-07-10 at 10:47 +0000, Chan, Aaron Chun Yew wrote:
> [Richard] I think this means you're using python2 and we really should
> be using
>                 python3 as I don't want to support both...
> 
> [Reply] This error/bug was found during buildbot startup meaning this 
> is out of my control.

No, it is not out of your control.

>             Maybe you have a fix for this, otherwise I do suggest to 
> add in __init__.py in places where we need to source custom modules.
> 
> $ buildbot start ~/yocto-controller
> $ cat -n 100 ~/yocto-controller/twistd.log

Try using virtualenv:

$ python --version
Python 2.7.15rc1

$ virtualenv -p python3 test
Already using interpreter /usr/bin/python3 Using base prefix '/usr'
New python executable in /media/build1/test/bin/python3 Also creating executable in /media/build1/test/bin/python Installing setuptools, pkg_resources, pip, wheel...done.

$ . ./test/bin/activate

(test) richard at dax:/media/build1/$ python --version Python 3.6.5


If you start buildbot within the virtualenv, you should see it using python3.

Cheers,

Richard


More information about the yocto mailing list