<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 5 June 2017 at 10:15, Li Zhou <span dir="ltr"><<a href="mailto:li.zhou@windriver.com" target="_blank">li.zhou@windriver.com</a>></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 's:--sysroot=${STAGING_DIR_<wbr>TARGET}::g' -e s:'--with-libtool-sysroot=${<wbr>STAGING_DIR_TARGET}'::g \<br>
+ -e 's:${STAGING_DIR_NATIVE}::g' \<br>
+ -e 's:${STAGING_DIR_HOST}::g' \<br>
+ -e 's:${WORKDIR}::g' \<br>
+ -e 's:${TMPDIR}::g' \<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't touch the .pyc files, so they'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>