[OE-core] [RFC 2/2] meta: rm __pycache__ in glib.inc::do_install_append()

Martin Hundebøll martin at hundeboll.net
Wed Oct 29 11:18:47 UTC 2014


Python3 places bytecode files in./ __pycache__ instead of simple .pyc
and .pyo in the script folder.

With python3 as the default python binary (i.e. /usr/bin/python ->
python3), the building glib-2.0 fails in do_package() due to the mentioned
python cache files not being installed/removed. Fix this by removing the
__pycache__ folder during do_install_append(), as is done with *.pyc and
*.pyo.

Signed-off-by: Martin Hundebøll <martin at hundeboll.net>
---
 meta/recipes-core/glib-2.0/glib.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 993320b..77644a9 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -63,6 +63,7 @@ do_install_append () {
 	# Remove some unpackaged files
 	rm -f ${D}${datadir}/glib-2.0/codegen/*.pyc
 	rm -f ${D}${datadir}/glib-2.0/codegen/*.pyo
+	rm -rf ${D}${datadir}/glib-2.0/codegen/__pycache__/
 
 	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
 	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
-- 
2.1.2




More information about the Openembedded-core mailing list