diff mbox series

[meta-oe,scarthgap,08/21] python3-kivy: Remove buildpaths from comments in generated C sources

Message ID 20250331210101.3460858-8-martin.jansa@gmail.com
State New
Headers show
Series [meta-oe,scarthgap,01/21] wolfssl: Add packageconfig for reproducible build | expand

Commit Message

Martin Jansa March 31, 2025, 9 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>

Cython does not provide a direct option to disable or customize
the metadata written in the generated C files. The metadata
includes information like the Cython version and absolute paths to
the original Cython files, which can be problematic for doing
reproducible builds

Therefore edit out these comments from the cython generated C files
they are nicely tucked between two known tags at the top of file.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb b/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb
index 991aa0f7d8..2c66db188b 100644
--- a/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb
+++ b/meta-python/recipes-devtools/python/python3-kivy_2.3.0.bb
@@ -70,3 +70,10 @@  RDEPENDS:${PN} = " \
     python3-pillow \
     python3-pygments \
 "
+
+do_compile:append() {
+    for f in `find ${B} -name *.c`
+    do
+        sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d" $f
+    done
+}