From: Yasir-Khan Date: Mon, 8 Sep 2014 11:58:41 +0000 (+0100) Subject: python-native: disable user site support X-Git-Tag: 2015-4~1595 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=c448bf3629ab5d930ed845d4ba48e37e4a85d2a3;p=openembedded-core.git python-native: disable user site support The user site-packages gets inserted into sys.path ahead of the system site directories, so a site package installed there will be used in preference to what's in our sysroot, causing less deterministic builds, and potential build breakage, depending on what the user has installed there. Disable it for our native python, so they don't affect our builds. Signed-off-by: Christopher Larson Signed-off-by: Yasir-Khan Signed-off-by: Saul Wold Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/python/python-native_2.7.3.bb b/meta/recipes-devtools/python/python-native_2.7.3.bb index 827654dfa2..e55f5feac2 100644 --- a/meta/recipes-devtools/python/python-native_2.7.3.bb +++ b/meta/recipes-devtools/python/python-native_2.7.3.bb @@ -58,4 +58,8 @@ do_install() { # (these often end up too long for the #! parser in the kernel as the # buffer is 128 bytes long). ln -s python-native/python ${D}${bindir}/nativepython + + # We don't want modules in ~/.local being used in preference to those + # installed in the native sysroot, so disable user site support. + sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py }