From: He Zhe <[email protected]>
To make the native python3 always used,
- Use sed one-liner instead
- Add substitution for ${S}/scripts/bpf_helpers_doc.py to fix the
following warning.
File "/usr/lib/python3.6/sysconfig.py", line 421, in _init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata'
This issue is first reported by Joel Stanley <[email protected]>
The sed one-liner is credited to Anuj Mittal <[email protected]>
(From OE-Core rev: 3f93173130a94310255389cfc62c67102a4fb21b)
Signed-off-by: He Zhe <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit 3a1a18ba9d28adb5562eabe9ec354f6d93154f5c)
Signed-off-by: Anuj Mittal <[email protected]>
---
meta/recipes-kernel/perf/perf.bb | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index d707b580e2..904aca95de 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -233,11 +233,8 @@ do_configure_prepend () {
fi
# use /usr/bin/env instead of version specific python
- for s in `find ${S}/tools/perf/ -name '*.py'`; do
- sed -i 's,/usr/bin/python,/usr/bin/env python3,' "${s}"
- sed -i 's,/usr/bin/python2,/usr/bin/env python3,' "${s}"
- sed -i 's,/usr/bin/env python2,/usr/bin/env python3,' "${s}"
- sed -i 's,/usr/bin/python3,/usr/bin/env python3,' "${s}"
+ for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name
'bpf_helpers_doc.py'`; do
+ sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
done
# unistd.h can be out of sync between libc-headers and the captured
version in the perf source
--
2.25.4
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#141056):
https://lists.openembedded.org/g/openembedded-core/message/141056
Mute This Topic: https://lists.openembedded.org/mt/75840352/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-