<div dir="ltr">Hello folks,<div><br></div><div>I searched through the mailing list but haven't seen anyone brought up. Here's a weird bug I found on my setup: pythonnative seems to be using python3.4.3 whereas the recipe specified 2.7.</div><div><br></div><div>Before diving into the layers of bitbake recipes to root cause what caused this, I want to post on the mailing list to see if it is reproducible on other setups, and if people have ideas why this went wrong (environment variable accidentally being overwritten?)</div><div><br></div><div><b>What I tested:</b></div><div>I found the code in phosphor-settings-manager, which inherits pythonnative, seems to be working per python 3, so added the following line into a native python function:</div><div><br></div><div>python do_check_version () {</div><div>  import sys</div><div>  bb.warn(sys.version)</div><div>}</div><div>addtask check_version after do_configure before do_compile<br></div><div><br></div><div>WARNING: phosphor-settings-manager-1.0-r1 do_check_version: 3.4.3 (default, Nov 17 2016, 01:08:31) <br></div><div><br></div><div>This is with openbmc git tip, building MACHINE=zaius</div><div><br></div><div><b>What the recipe should be using is seemingly 2.7:</b></div><div><div>$ cat ../import-layers/yocto-poky/meta/classes/pythonnative.bbclass</div><div><br></div><div>inherit python-dir</div><div>[...]</div></div><div><br></div><div><div>$ cat ../import-layers/yocto-poky/meta/classes/python-dir.bbclass </div><div>PYTHON_BASEVERSION = "2.7"</div><div>PYTHON_ABI = ""</div><div>PYTHON_DIR = "python${PYTHON_BASEVERSION}"</div><div>PYTHON_PN = "python"</div><div>PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages"</div></div><div><br></div><div><div><b>Why this is bad:</b></div><div>well, python2.7 and python3 have a ton of differences. A bug I discovered is due to usage of filter(), which returns different objects between Python2/3.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Regards,<div>Kun</div></div></div>
</div></div>