mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
python3: Fix python interpreter line length for nativesdk
Make sure the python interpreter is "#!/usr/bin/env python3" for
nativesdk to avoid the shebang path exceeding the limit when install
the sdk under the directory with long path.
Before:
$ cd ${target_sdk_dir}
$ vi ./sysroots/x86_64-oesdk-linux/usr/bin/2to3
#!${target_sdk_dir}/sysroots/${SDK_SYS}/usr/bin/python3.9
[snip]
After:
$ cd ${target_sdk_dir}
$ vi ./sysroots/x86_64-oesdk-linux/usr/bin/2to3
#!/usr/bin/env python3
[snip]
(From OE-Core rev: 57af8ed4d3f1645d9a648ae1e569c792d9bcb361)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a748e6098fa7d2ff594319937c7e0cf97700e83a)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6bf6d80b17
commit
e35f1eef03
@@ -169,6 +169,10 @@ do_install_append() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_install_append_class-nativesdk () {
|
do_install_append_class-nativesdk () {
|
||||||
|
# Make sure we use /usr/bin/env python
|
||||||
|
for PYTHSCRIPT in `grep -rIl ${bindir}/python ${D}${bindir}`; do
|
||||||
|
sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
|
||||||
|
done
|
||||||
create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
|
create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user