mirror of
https://git.yoctoproject.org/poky
synced 2026-05-04 13:39:49 +02:00
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. (From OE-Core rev: 9573034eb8cdc3b9c2add67ac0a92277dc26389f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user