]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/cython: also process .cpp files
authorRoss Burton <ross.burton@arm.com>
Wed, 24 Sep 2025 12:07:39 +0000 (13:07 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Sep 2025 09:57:11 +0000 (10:57 +0100)
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...

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/cython.bbclass

index dd9fc732bcb965209d897e1c69d83a94b4bde6a5..9ae7a2913457106a5edaf219d2d4eeb883d68054 100644 (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"
 }