[OE-core] [PATCH V2] python2/3: Remove building host path from packages
Burton, Ross
ross.burton at intel.com
Thu Jun 8 13:36:09 UTC 2017
On 5 June 2017 at 10:15, Li Zhou <li.zhou at windriver.com> wrote:
> @@ -185,9 +185,14 @@ py_package_preprocess () {
> install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${
> PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}/Makefile
> # Remove references to buildmachine paths in target Makefile and
> _sysconfigdata
> sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e
> s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
> + -e 's:${STAGING_DIR_NATIVE}::g' \
> + -e 's:${STAGING_DIR_HOST}::g' \
> + -e 's:${WORKDIR}::g' \
> + -e 's:${TMPDIR}::g' \
> ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
> ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config-${
> PYTHON_MAJMIN}${PYTHON_ABI}/Makefile \
> - ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
> + ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
> \
> + ${PKGD}/${bindir}/python${PYTHON_MAJMIN}${PYTHON_ABI}-
> config
> }
>
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:
ross at flashheart
/data/poky-master/tmp/work/corei7-64-poky-linux/python3/3.5.3-r1.0/packages-split
$ grep -r /data/poky-master
Binary file
python3-core/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.opt-2.pyc
matches
Binary file
python3-core/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.opt-1.pyc
matches
Binary file
python3-core/usr/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.pyc
matches
I think the seds need to be moved earlier in the build, or that py file
recompiled.
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170608/aa18639a/attachment-0002.html>
More information about the Openembedded-core
mailing list