From: Martin Kelly Date: Tue, 12 Sep 2017 21:03:20 +0000 (-0700) Subject: python*native.bbclass: suppress user site dirs X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~20002 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/meta/classes/python3native.bbclass b/meta/classes/python3native.bbclass index ef468b3fdef..89665efee8b 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 4e0381b5684..4cc8b2769c2 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