From: Alexandru Ardelean Date: Thu, 16 Oct 2014 05:46:32 +0000 (+0300) Subject: python: reduce bloat by removing *.pyo and *.pyc files X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=714b1247b70b8b2c185aa30ae914fd90de826f41;p=openwrt-packages.git python: reduce bloat by removing *.pyo and *.pyc files Seems that if you add a package folder this would also include the compiled python files which increases fw size. Signed-off-by: Alexandru Ardelean --- diff --git a/lang/python/files/python-package.mk b/lang/python/files/python-package.mk index 0196beeb6..6ac6051fa 100644 --- a/lang/python/files/python-package.mk +++ b/lang/python/files/python-package.mk @@ -32,6 +32,7 @@ define PyPackage $(call shexport,PyPackage/$(1)/filespec) define Package/$(1)/install + find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" | xargs rm -f @$(SH_FUNC) getvar $$(call shvar,PyPackage/$(1)/filespec) | ( \ IFS='|'; \ while read fop fspec fperm; do \