summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-devtools
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2018-08-29 06:06:42 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-07 11:24:02 -0400
commitacdd46d07a7d090e745aaa772ae206b64806ba56 (patch)
tree73e2242ec2a474b53dd6df7e0e0fe7a5a1c9d965 /meta-phosphor/recipes-devtools
parent4b6e578cc80ae1b7f84911ae7ea69d19a35d45cd (diff)
downloadtalos-openbmc-acdd46d07a7d090e745aaa772ae206b64806ba56.tar.gz
talos-openbmc-acdd46d07a7d090e745aaa772ae206b64806ba56.zip
phosphor-tiny: Reduce python.bb .py files
Only the .pyc files are needed from the python recipe. There was some discussion of natively supporting this in the python recipe within this bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6434 But nothing ever came of it so for now bbappend a file that removes the unneeded .py files during install. This saves us 800KB of rofs space. Testing: Verified the python apps still started without issue in QEMU. Resolves: openbmc/openbmc#3372 (From meta-phosphor rev: 20e22db34e1d1b913607b538d3c536979f38ecf4) Change-Id: I63b452dd63cff3274414b3e01183b62c0c7656f8 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-devtools')
-rw-r--r--meta-phosphor/recipes-devtools/python/python_2.%.bbappend10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-devtools/python/python_2.%.bbappend b/meta-phosphor/recipes-devtools/python/python_2.%.bbappend
index 6d0ff6901..12e1955ae 100644
--- a/meta-phosphor/recipes-devtools/python/python_2.%.bbappend
+++ b/meta-phosphor/recipes-devtools/python/python_2.%.bbappend
@@ -12,3 +12,13 @@ FILES_${PN}-spwd= " \
${libdir}/python${PYTHON_MAJMIN}/lib-dynload/spwd.so \
${libdir}/python${PYTHON_MAJMIN}/lib-dynload/grp.so \
"
+# Remove all python .py files from python recipe. Only the .pyc
+# files are required. Only do this if the openbmc-phosphor-tiny
+# distro feature is enabled
+do_install_append_openbmc-phosphor-tiny() {
+ find ${D}${libdir}/python${PYTHON_MAJMIN} -name \*.py -exec rm {} \;
+ # This is a system configuration file generated during build time.
+ # It's used in the yocto packaging process so it is required to
+ # remain in the image.
+ cp ${WORKDIR}/recipe-sysroot-native/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py ${D}${libdir}/python${PYTHON_MAJMIN}/
+}
OpenPOWER on IntegriCloud