mirror of
https://git.yoctoproject.org/poky
synced 2026-02-06 16:56:37 +01:00
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. (From OE-Core rev: c448bf3629ab5d930ed845d4ba48e37e4a85d2a3) 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>
This commit is contained in:
committed by
Richard Purdie
parent
fe0f441171
commit
77369679ef
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user