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:07:50 +0000 |
| commit | 417f4de5c6c89642835202608ff1ae0fb107657b (patch) | |
| tree | 966ed836513dc70cc2844360d5171572c926c866 /meta | |
| parent | 4be36f585893758092de88865976bf9e513cfd03 (diff) | |
| download | poky-417f4de5c6c89642835202608ff1ae0fb107657b.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.
(From OE-Core rev: 9573034eb8cdc3b9c2add67ac0a92277dc26389f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -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 () { | |||
| 32 | sed -i -e "1s,#!.*nativepython3,#!${USRBINPATH}/env ${PIP_INSTALL_PYTHON}," $i | 32 | sed -i -e "1s,#!.*nativepython3,#!${USRBINPATH}/env ${PIP_INSTALL_PYTHON}," $i |
| 33 | sed -i -e "s:${PYTHON}:${USRBINPATH}/env\ ${PIP_INSTALL_PYTHON}:g" $i | 33 | sed -i -e "s:${PYTHON}:${USRBINPATH}/env\ ${PIP_INSTALL_PYTHON}:g" $i |
| 34 | sed -i -e "s:${STAGING_BINDIR_NATIVE}:${bindir}:g" $i | 34 | sed -i -e "s:${STAGING_BINDIR_NATIVE}:${bindir}:g" $i |
| 35 | # Recompile after modifying it | ||
| 36 | cd ${D} | ||
| 37 | file=`echo $i | sed 's:^${D}/::'` | ||
| 38 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 -c "from py_compile import compile; compile('$file')" | ||
| 39 | cd - | ||
| 35 | fi | 40 | fi |
| 36 | done | 41 | done |
| 37 | } | 42 | } |
