diff options
author | Paul Barker <pbarker@konsulko.com> | 2020-12-16 18:16:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-20 00:03:04 +0000 |
commit | f50b230c27077e32eeab38fde11308d90b73a664 (patch) | |
tree | 0ebf1707f5d579976c3c0c834a560e8e20b6a03c /meta-selftest/lib/pseudo_pyc_test2.py | |
parent | e12072c7e043a2d3e45b75cb1aaca70c49e94cb4 (diff) | |
download | poky-f50b230c27077e32eeab38fde11308d90b73a664.tar.gz |
bitbake.conf: Prevent pyc file generation in pseudo context
This also effectively reverts commit b6d30c21b0:
bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/meta
The contents of ${COREBASE}/meta were ignored as pyc files could be
generated for the contents of the lib subdirectory if python modules
were imported within a pseudo context. However this doesn't protect us
from pyc files being generated in the lib directories for other layers.
It's far better to tell python not to produce pyc files when running
under pseudo (by setting the PYTHONDONTWRITEBYTECODE variable) as this
will cover any location where pyc files could possibly be created. This
variable is set in FAKEROOTBASEENV so that it applies to the
bitbake-worker instance for fakeroot tasks, preventing pyc files from
being generated for imports in python tasks themselves.
Also add a test case to ensure that pyc files are not created in tasks
which are executed under pseudo.
(From OE-Core rev: 73d538f20743017a44cea4c20dbe09a0327cfc71)
Signed-off-by: Paul Barker <pbarker@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/lib/pseudo_pyc_test2.py')
-rw-r--r-- | meta-selftest/lib/pseudo_pyc_test2.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-selftest/lib/pseudo_pyc_test2.py b/meta-selftest/lib/pseudo_pyc_test2.py new file mode 100644 index 0000000000..fb67a978e0 --- /dev/null +++ b/meta-selftest/lib/pseudo_pyc_test2.py | |||
@@ -0,0 +1 @@ | |||
STRING = "pseudo_pyc_test2" | |||