diff options
author | Yasir-Khan <yasir_khan@mentor.com> | 2014-09-08 12:58:41 +0100 |
---|---|---|
committer | Andreas Oberritter <obi@opendreambox.org> | 2015-02-23 17:15:47 +0100 |
commit | 5c33c45fef6d512ded3bc01cc08600dbc106824a (patch) | |
tree | 52460ff80116850b0aa44ad8d1f4de30b45c7a59 /meta | |
parent | 3a02e47b16cb11182e37cc8afc876284f53f7d74 (diff) | |
download | openembedded-core-contrib-5c33c45fef6d512ded3bc01cc08600dbc106824a.tar.gz |
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 <kergoth@gmail.com>
Signed-off-by: Yasir-Khan <yasir_khan@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c448bf3629ab5d930ed845d4ba48e37e4a85d2a3)
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python-native_2.7.3.bb | 4 |
1 files changed, 4 insertions, 0 deletions
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 8a0dd20d07..45eb177fb0 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 } |