summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.7.3.bb
diff options
context:
space:
mode:
authorJaewon Lee <jaewon.lee@xilinx.com>2019-04-25 16:02:21 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-29 14:16:30 +0100
commit4a42d6907ab3fb1e890b82c2ac9427b742ad5a4b (patch)
tree46e9bc6ed66e4b54ebbf9897b67796343209f55a /meta/recipes-devtools/python/python3_3.7.3.bb
parentdfd5d84ecf930623dbb297c1c0f9b77f374314c3 (diff)
downloadpoky-4a42d6907ab3fb1e890b82c2ac9427b742ad5a4b.tar.gz
Adding back wrapper and using OEPYTHON3HOME variable for python3
Adding back the python wrapper and adding a patch to use OEPYTHON3HOME instead of PYTHONHOME if set, for python3. If we add back the wrapper as is, we would see the following error that we also see in Thud: ImportError: No module named site OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3. Please upgrade your python v2 This is because python3 would've set PYTHONHOME to use nativesdk python3 libraries but when the oe-buildenv-internal script tries to call python2 for the py_v27_check, there will be no python2 libraries in the PYTHONHOME directory. In other words, bitbake needs host python2 and the env variable set from the wrapper contaminates the env and host python2 won't be able to find its libraries Creating another variable OEPYTHON3HOME and using this in the python3 wrapper to allow for a way to set a different paths for python3 and python2 [YOCTO #13208] (From OE-Core rev: 75d2a85e24ef9a2bf0e218521944523f0ff281e0) Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.7.3.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.7.3.bb7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3_3.7.3.bb b/meta/recipes-devtools/python/python3_3.7.3.bb
index 3a1c8f5be6..eee01c3af6 100644
--- a/meta/recipes-devtools/python/python3_3.7.3.bb
+++ b/meta/recipes-devtools/python/python3_3.7.3.bb
@@ -29,6 +29,9 @@ SRC_URI_append_class-native = " \
29 file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \ 29 file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
30 file://12-distutils-prefix-is-inside-staging-area.patch \ 30 file://12-distutils-prefix-is-inside-staging-area.patch \
31 " 31 "
32SRC_URI_append_class-nativesdk = " \
33 file://0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch \
34 "
32 35
33SRC_URI[md5sum] = "93df27aec0cd18d6d42173e601ffbbfd" 36SRC_URI[md5sum] = "93df27aec0cd18d6d42173e601ffbbfd"
34SRC_URI[sha256sum] = "da60b54064d4cfcd9c26576f6df2690e62085123826cff2e667e72a91952d318" 37SRC_URI[sha256sum] = "da60b54064d4cfcd9c26576f6df2690e62085123826cff2e667e72a91952d318"
@@ -132,6 +135,10 @@ do_install_append() {
132 ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py 135 ${D}${libdir}/python-sysconfigdata/_sysconfigdata.py
133} 136}
134 137
138do_install_append_class-nativesdk () {
139 create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} OEPYTHON3HOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
140}
141
135SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py" 142SSTATE_SCAN_FILES += "Makefile _sysconfigdata.py"
136PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" 143PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
137 144