]> code.ossystems Code Review - openembedded-core.git/commitdiff
python*native.bbclass: suppress user site dirs
authorMartin Kelly <mkelly@xevo.com>
Tue, 12 Sep 2017 21:03:20 +0000 (14:03 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 13 Sep 2017 22:46:02 +0000 (23:46 +0100)
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>
meta/classes/python3native.bbclass
meta/classes/pythonnative.bbclass

index ef468b3fdefca7322a991efcbe614308a546d9b9..89665efee8b86d60ed571522c3bcfd72062bad46 100644 (file)
@@ -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
index 4e0381b5684762015b43fd99447678efffb12ba0..4cc8b2769c27914f5e681f4f70bbd2ba82ac38fd 100644 (file)
@@ -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