Files
poky/meta/classes-recipe/cython.bbclass
Ross Burton 52df555405 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>
2025-09-25 11:09:04 +01:00

9 lines
382 B
Plaintext

DEPENDS:append = " python3-cython-native"
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" -o -name "*.cpp" \) -print0 | xargs --no-run-if-empty --null sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d"
}