From 71bf8e9e418af6213de17903f54502b5b1055872 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Tue, 23 Aug 2022 07:03:36 +0000 Subject: [PATCH] python3: disable user site-pkg for native target by setting the ENABLE_USER_SITE flag globally. This is the recommended way according to https://peps.python.org/pep-0370/#implementation Signed-off-by: Konrad Weihmann Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python3_3.10.6.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-devtools/python/python3_3.10.6.bb b/meta/recipes-devtools/python/python3_3.10.6.bb index f19cd502732..1b28728732b 100644 --- a/meta/recipes-devtools/python/python3_3.10.6.bb +++ b/meta/recipes-devtools/python/python3_3.10.6.bb @@ -171,6 +171,9 @@ do_install:append:class-native() { # Nothing should be looking into ${B} for python3-native sed -i -e 's:${B}:/build/path/unavailable/:g' \ ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile + + # disable the lookup in user's site-packages globally + sed -i 's#ENABLE_USER_SITE = None#ENABLE_USER_SITE = False#' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py } do_install:append() { -- 2.47.3