]> code.ossystems Code Review - openembedded-core.git/commitdiff
distutils.bbclass: don't delete .pyo files
authorAndreas Oberritter <obi@opendreambox.org>
Mon, 21 May 2012 20:54:23 +0000 (22:54 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 May 2012 07:34:50 +0000 (08:34 +0100)
* 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 <obi@opendreambox.org>
meta/classes/distutils.bbclass

index 18ae805f7bbce846c98e0297d4cbe67102a626a2..bcddf8d978ad196c400555dfc8741e1b41310445 100644 (file)
@@ -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