distutils.bbclass: don't delete .pyo files

* 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.

(From OE-Core rev: 25e186ad5b75bd2f93435857580bd16698e18e21)

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Andreas Oberritter 2012-05-21 22:54:23 +02:00 committed by Richard Purdie
parent 3db152524f
commit dc290d16eb
1 changed files with 0 additions and 4 deletions

View 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