diff options
author | Martin Kelly <mkelly@xevo.com> | 2017-09-12 14:03:20 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-13 23:46:02 +0100 |
commit | 8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f (patch) | |
tree | e825e17771eeda3d0565e664ebc0e1fa798c0d7c | |
parent | 7351e0b260876b9bbc8660c2bb4173ab4c130f8b (diff) | |
download | openembedded-core-8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f.tar.gz openembedded-core-8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f.tar.bz2 openembedded-core-8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f.zip |
python*native.bbclass: suppress user site dirs
Currently, $HOME/.local is being added into sys.path for the native
Python, causing subtle host contamination. Suppress this by exporting
PYTHONNOUSERSITE = "1" as documented in PEP 370.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/python3native.bbclass | 3 | ||||
-rw-r--r-- | meta/classes/pythonnative.bbclass | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass index ef468b3fde..89665efee8 100644 --- a/meta/classes/python3native.bbclass +++ b/meta/classes/python3native.bbclass @@ -9,5 +9,8 @@ DEPENDS_append = " ${PYTHON_PN}-native " export STAGING_INCDIR export STAGING_LIBDIR +# suppress host user's site-packages dirs. +export PYTHONNOUSERSITE = "1" + # autoconf macros will use their internal default preference otherwise export PYTHON diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass index 4e0381b568..4cc8b2769c 100644 --- a/meta/classes/pythonnative.bbclass +++ b/meta/classes/pythonnative.bbclass @@ -12,5 +12,8 @@ DEPENDS_append = " ${PYTHON_PN}-native " export STAGING_INCDIR export STAGING_LIBDIR +# suppress host user's site-packages dirs. +export PYTHONNOUSERSITE = "1" + # autoconf macros will use their internal default preference otherwise export PYTHON |