If we modify the file, we need to recompile the pyc files since the file hash has changed. This would otherwise result in reproducibility failrues.
Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org> --- meta/classes/pip_install_wheel.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index f0312e0b1eb..8a848c0ebab 100644 --- a/meta/classes/pip_install_wheel.bbclass +++ b/meta/classes/pip_install_wheel.bbclass @@ -32,6 +32,11 @@ pip_install_wheel_do_install () { sed -i -e "1s,#!.*nativepython3,#!${USRBINPATH}/env ${PIP_INSTALL_PYTHON}," $i sed -i -e "s:${PYTHON}:${USRBINPATH}/env\ ${PIP_INSTALL_PYTHON}:g" $i sed -i -e "s:${STAGING_BINDIR_NATIVE}:${bindir}:g" $i + # Recompile after modifying it + cd ${D} + file=`echo $i | sed 's:^${D}/::'` + ${STAGING_BINDIR_NATIVE}/python3-native/python3 -c "from py_compile import compile; compile('$file')" + cd - fi done } -- 2.32.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#162400): https://lists.openembedded.org/g/openembedded-core/message/162400 Mute This Topic: https://lists.openembedded.org/mt/89389651/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-