<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 5 June 2017 at 10:15, Li Zhou <span dir="ltr">&lt;<a href="mailto:li.zhou@windriver.com" target="_blank">li.zhou@windriver.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-:1hn" class="gmail-a3s gmail-aXjCH gmail-m15c778af488b389e">@@ -185,9 +185,14 @@ py_package_preprocess () {<br>
        install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/<span class="gmail-il">python</span>${<wbr>PYTHON_MAJMIN}/config-${<wbr>PYTHON_MAJMIN}${PYTHON_ABI}/<wbr>Makefile<br>
        # Remove references to buildmachine paths in target Makefile and _sysconfigdata<br>
        sed -i -e &#39;s:--sysroot=${STAGING_DIR_<wbr>TARGET}::g&#39; -e s:&#39;--with-libtool-sysroot=${<wbr>STAGING_DIR_TARGET}&#39;::g \<br>
+               -e &#39;s:${STAGING_DIR_NATIVE}::g&#39; \<br>
+               -e &#39;s:${STAGING_DIR_HOST}::g&#39; \<br>
+               -e &#39;s:${WORKDIR}::g&#39; \<br>
+               -e &#39;s:${TMPDIR}::g&#39; \<br>
                ${PKGD}/${libdir}/<span class="gmail-il">python</span>${<wbr>PYTHON_MAJMIN}/config/Makefile \<br>
                ${PKGD}/${libdir}/<span class="gmail-il">python</span>${<wbr>PYTHON_MAJMIN}/config-${<wbr>PYTHON_MAJMIN}${PYTHON_ABI}/<wbr>Makefile \<br>
-               ${PKGD}/${libdir}/<span class="gmail-il">python</span>${<wbr>PYTHON_MAJMIN}/_sysconfigdata.<wbr>py<br>
+               ${PKGD}/${libdir}/<span class="gmail-il">python</span>${<wbr>PYTHON_MAJMIN}/_sysconfigdata.<wbr>py \<br>
+               ${PKGD}/${bindir}/<span class="gmail-il">python</span>${<wbr>PYTHON_MAJMIN}${PYTHON_ABI}-<wbr>config<br>
 }</div></blockquote></div><br>The problem with doing this is py_package_preprocess is that it doesn&#39;t touch the .pyc files, so they&#39;ll have to be recompiled:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">ross@flashheart /data/poky-master/tmp/work/corei7-64-poky-linux/python3/3.5.3-r1.0/packages-split</div><div class="gmail_extra">$ grep -r /data/poky-master</div><div class="gmail_extra">Binary file python3-core/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.opt-2.pyc matches</div><div class="gmail_extra">Binary file python3-core/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.opt-1.pyc matches</div><div class="gmail_extra">Binary file python3-core/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.pyc matches</div><div class="gmail_extra"><br></div><div class="gmail_extra">I think the seds need to be moved earlier in the build, or that py file recompiled.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ross</div></div></div>