The python "optimised" .pyc files contain buildpaths. Delete those and
leave the "unoptimised" .pyc files. The difference is very minor, mainly
that optimised bytecode doesn't contain any assert statements.

Signed-off-by: Ross Burton <[email protected]>
---
 meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb 
b/meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb
index a8d6a2ad69..498d392e89 100644
--- a/meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb
+++ b/meta-gnome/recipes-gnome/gnome-tweaks/gnome-tweaks_40.0.bb
@@ -25,6 +25,12 @@ SRC_URI += " \
 
 EXTRA_OEMESON = "-Dpython_site_dir=${PYTHON_SITEPACKAGES_DIR}"
 
+# The optimised .pyc files contain buildpaths, delete them and leave the
+# normal ones to be packaged.
+do_install:append() {
+    find ${D}${PYTHON_SITEPACKAGES_DIR} -name *.opt*.pyc -delete
+}
+
 FILES:${PN} += " \
     ${datadir}/metainfo \
     ${PYTHON_SITEPACKAGES_DIR} \
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#121583): 
https://lists.openembedded.org/g/openembedded-devel/message/121583
Mute This Topic: https://lists.openembedded.org/mt/116263927/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to