python3-scons: fix regex replacing python by python3

Match only the first line and match even if the line says python3.
Otherwise we end up with multiple 3s at the end after multiple
invocations of do_install on same source.

(From OE-Core rev: 144c6c7183dd2b32c65edf325038eb84683a28f8)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Anuj Mittal
2019-06-13 08:28:48 +08:00
committed by Richard Purdie
parent 07526deab6
commit 2938210267

View File

@@ -15,7 +15,7 @@ UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
inherit setuptools3
do_install_prepend() {
sed -i -e "s:/usr/bin/env python:/usr/bin/env python3:g" ${S}/script/*
sed -i -e "1s,#!.*python.*,#!${USRBINPATH}/env python3," ${S}/script/*
}
RDEPENDS_${PN} = "\