diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2015-06-11 15:38:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:46:56 +0100 |
commit | 4caed87a38e8c5afef679a90fb7f74f26ece2043 (patch) | |
tree | 1a58006565a479a72f3f0ef14ef633708fa627a1 /meta/classes/distutils.bbclass | |
parent | de18f7595f4f96ee78c1d2839f8be4d160a07ba3 (diff) | |
download | poky-4caed87a38e8c5afef679a90fb7f74f26ece2043.tar.gz |
distutils: regenerate pyc files after being modified by sed
py files are edited by sed and therefore *.pyc files are recreated on first boot, but if you have a read-only filesystem this is not possible. This patch creates pyc files directly after the py files are modified.
[YOCTO #7722]
(From OE-Core rev: a0460ac8a2595d4b064b483ca1f282a255ae6411)
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Thomas Roos <roosesweb@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/distutils.bbclass')
-rw-r--r-- | meta/classes/distutils.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index c0bb573cf8..2498685d66 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass | |||
@@ -42,8 +42,8 @@ distutils_do_install() { | |||
42 | bbfatal "${PYTHON_PN} setup.py install execution failed." | 42 | bbfatal "${PYTHON_PN} setup.py install execution failed." |
43 | 43 | ||
44 | # support filenames with *spaces* | 44 | # support filenames with *spaces* |
45 | # only modify file if it contains path to avoid recompilation on the target | 45 | # only modify file if it contains path and recompile it |
46 | find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; | 46 | find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \; -exec ${STAGING_BINDIR_NATIVE}/python-native/python -mcompileall {} \; |
47 | 47 | ||
48 | if test -e ${D}${bindir} ; then | 48 | if test -e ${D}${bindir} ; then |
49 | for i in ${D}${bindir}/* ; do \ | 49 | for i in ${D}${bindir}/* ; do \ |