From patchwork Thu May 24 04:42:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Consolidated,Pull,20/28] distutils.bbclass: don't delete .pyo files Date: Thu, 24 May 2012 04:42:23 -0000 From: Saul Wold X-Patchwork-Id: 28565 Message-Id: <7d53fac61bf097fb97b018ac51a45176d574a8d1.1337834073.git.sgw@linux.intel.com> To: openembedded-core@lists.openembedded.org From: Andreas Oberritter * Deleting .pyo files causes them to get compiled on the target. * First boot gets *really* slow for python based projects. * No space gets saved on the target. * The package manager doesn't know about the files and therefore fails to uninstall them, occupying space and causing uninstalled python scripts to remain executable. * It's inconsistent, because python itself and autotools based projects already ship .pyo files. * Probably .pyo files were deleted because .pyc files were available earlier, but this has changed and OE-Core's python now only generates optimized .pyo files. Deletion of .pyo was introduced in 2008, python/04-default-is-optimized.patch was introduced in 2009. Signed-off-by: Andreas Oberritter --- meta/classes/distutils.bbclass | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index 18ae805..bcddf8d 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass @@ -65,10 +65,6 @@ distutils_do_install() { if test -e ${D}${datadir}/share; then mv -f ${D}${datadir}/share/* ${D}${datadir}/ fi - - # These are generated files, on really slow systems the storage/speed trade off - # might be worth it, but in general it isn't - find ${D}${libdir}/${PYTHON_DIR}/site-packages -iname '*.pyo' -exec rm {} \; } EXPORT_FUNCTIONS do_compile do_install