diff options
author | Martin Kelly <mkelly@xevo.com> | 2018-06-01 14:02:35 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-02 11:41:25 +0100 |
commit | 28b0c96473f821bcf754fda59a6ef3ef1bb63d58 (patch) | |
tree | 785cb9fe2ba578a0dc245147acb4f409079f81b0 /meta/recipes-devtools | |
parent | 5e2232b3c51ad76f54e565f1147c51d39539d62d (diff) | |
download | poky-28b0c96473f821bcf754fda59a6ef3ef1bb63d58.tar.gz |
nativesdk-python*: suppress user site dirs
Currently, $HOME/.local is being added into sys.path in the Python SDK
causing subtle host contamination. Suppress this by exporting
PYTHONNOUSERSITE = "1" as documented in PEP 370.
This issue occurred in the past for python*-native and was fixed
similarly in OE-core commit 8fe9fb4d5a61dcbcb3fc5b9ee0234cc135af873f
("python*native.bbclass: suppress user site dirs").
(From OE-Core rev: 0dc36439cb9fe1cea50bed59da6302f78372a30b)
(From OE-Core rev: 376827d359a3769ee6477eac6e6b349a2050a867)
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/python/python-scons-native_3.0.1.bb | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3_3.5.5.bb | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python_2.7.14.bb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python-scons-native_3.0.1.bb b/meta/recipes-devtools/python/python-scons-native_3.0.1.bb index dae89ab5d2..68b63c9357 100644 --- a/meta/recipes-devtools/python/python-scons-native_3.0.1.bb +++ b/meta/recipes-devtools/python/python-scons-native_3.0.1.bb | |||
@@ -4,5 +4,5 @@ DEPENDS = "python-native" | |||
4 | RDEPENDS_${PN} = "" | 4 | RDEPENDS_${PN} = "" |
5 | 5 | ||
6 | do_install_append() { | 6 | do_install_append() { |
7 | create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' | 7 | create_wrapper ${D}${bindir}/scons SCONS_LIB_DIR='${STAGING_DIR_HOST}/${PYTHON_SITEPACKAGES_DIR}' PYTHONNOUSERSITE='1' |
8 | } | 8 | } |
diff --git a/meta/recipes-devtools/python/python3_3.5.5.bb b/meta/recipes-devtools/python/python3_3.5.5.bb index f893b846ad..4dae4fa4c6 100644 --- a/meta/recipes-devtools/python/python3_3.5.5.bb +++ b/meta/recipes-devtools/python/python3_3.5.5.bb | |||
@@ -176,7 +176,7 @@ do_install() { | |||
176 | } | 176 | } |
177 | 177 | ||
178 | do_install_append_class-nativesdk () { | 178 | do_install_append_class-nativesdk () { |
179 | create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' | 179 | create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1' |
180 | } | 180 | } |
181 | 181 | ||
182 | SSTATE_SCAN_FILES += "Makefile" | 182 | SSTATE_SCAN_FILES += "Makefile" |
diff --git a/meta/recipes-devtools/python/python_2.7.14.bb b/meta/recipes-devtools/python/python_2.7.14.bb index 0a09926dfb..3044c3d363 100644 --- a/meta/recipes-devtools/python/python_2.7.14.bb +++ b/meta/recipes-devtools/python/python_2.7.14.bb | |||
@@ -129,7 +129,7 @@ do_install() { | |||
129 | } | 129 | } |
130 | 130 | ||
131 | do_install_append_class-nativesdk () { | 131 | do_install_append_class-nativesdk () { |
132 | create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' | 132 | create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1' |
133 | } | 133 | } |
134 | 134 | ||
135 | SSTATE_SCAN_FILES += "Makefile" | 135 | SSTATE_SCAN_FILES += "Makefile" |