[OE-core] [PATCH] python*native.bbclass: suppress user site dirs

Khem Raj raj.khem at gmail.com
Tue Sep 12 21:42:48 UTC 2017


On Tue, Sep 12, 2017 at 2:03 PM Martin Kelly <mkelly at xevo.com> wrote:

> 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.
>

LGTM

>
> Signed-off-by: Martin Kelly <mkelly at xevo.com>
> ---
>  meta/classes/python3native.bbclass | 3 +++
>  meta/classes/pythonnative.bbclass  | 3 +++
>  2 files changed, 6 insertions(+)
>
> 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
> --
> 2.11.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170912/496e0b63/attachment-0002.html>


More information about the Openembedded-core mailing list