diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-24 23:41:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-25 15:06:46 +0000 |
commit | 9573034eb8cdc3b9c2add67ac0a92277dc26389f (patch) | |
tree | 5fff72dbbe3e74d1f8e0b0fa1621b75e113f6f86 | |
parent | 32a61afde0e7d8df6634b88525d8c3e8c6c3516e (diff) | |
download | openembedded-core-contrib-9573034eb8cdc3b9c2add67ac0a92277dc26389f.tar.gz |
pip_install_wheel: Recompile modified files
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.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/pip_install_wheel.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/pip_install_wheel.bbclass b/meta/classes/pip_install_wheel.bbclass index 70f47d6f79..2f21a8ee56 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 } |