[OE-core] [PATCH V2] python2/3: Remove building host path from packages

Li Zhou li.zhou at windriver.com
Mon Jun 5 09:15:12 UTC 2017


Remove building host related path from python2 and python3 packages.

Signed-off-by: Li Zhou <li.zhou at windriver.com>
---
 meta/recipes-devtools/python/python3_3.5.3.bb | 7 ++++++-
 meta/recipes-devtools/python/python_2.7.13.bb | 5 +++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python3_3.5.3.bb b/meta/recipes-devtools/python/python3_3.5.3.bb
index d7c29f2..58313f7 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -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
 }
 
 require python-${PYTHON_MAJMIN}-manifest.inc
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.13.bb
index 4ef9952..e93a84f 100644
--- a/meta/recipes-devtools/python/python_2.7.13.bb
+++ b/meta/recipes-devtools/python/python_2.7.13.bb
@@ -131,7 +131,12 @@ py_package_preprocess () {
 
 	# 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/config.c \
 		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
     python -m py_compile ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
 }
-- 
1.9.1




More information about the Openembedded-core mailing list