[OE-core] [PATCH 4/6] python3-core: improve reproducibility
Hongxu Jia
hongxu.jia at windriver.com
Fri Jan 12 08:11:25 UTC 2018
Since modify _sysconfigdata.py to improve reproducibility,
its pyo files should be recompiled.
Remove remaining build host references of python3.5m-config
Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
---
meta/recipes-devtools/python/python3_3.5.3.bb | 13 ++++++++++++-
1 file changed, 12 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 7f54ea4..16bc85d 100644
--- a/meta/recipes-devtools/python/python3_3.5.3.bb
+++ b/meta/recipes-devtools/python/python3_3.5.3.bb
@@ -193,7 +193,18 @@ py_package_preprocess () {
-e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::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_BINABI}-config
+
+ # Recompile _sysconfigdata after modifying it
+ cd ${PKGD}
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py')"
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=1)"
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} \
+ -c "from py_compile import compile; compile('./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py', optimize=2)"
+ cd -
}
require python-${PYTHON_MAJMIN}-manifest.inc
--
2.8.1
More information about the Openembedded-core
mailing list