classes/cython: also process .cpp files

Some Python packages, such as python3-frozenlist, generate .cpp files
with cython so we should also process those.

Frustratingly this doesn't actually solve the reproducible problem with
frozenlist as the path is a temporary directory...

(From OE-Core rev: 07f156731a9dd7cade56e1d64444dafa18f57e6f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2025-09-24 13:07:39 +01:00 committed by Richard Purdie
parent 9e8e9a6a4b
commit 52df555405

View File

@ -4,5 +4,5 @@ do_compile[postfuncs] = "strip_cython_metadata"
strip_cython_metadata() {
# Remove the Cython Metadata headers that we don't need after the build, and
# may contain build paths.
find ${S} -name "*.c" -print0 | xargs --no-run-if-empty --null sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d"
find ${S} \( -name "*.c" -o -name "*.cpp" \) -print0 | xargs --no-run-if-empty --null sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d"
}