Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] distutils.bbclass: don't delete .pyo files
@ 2012-05-21 20:54 Andreas Oberritter
  2012-05-21 20:54 ` [PATCH 2/2] python: bump PR of packages after update of distutils.bbclass Andreas Oberritter
  2012-05-24 17:57 ` [PATCH 1/2] distutils.bbclass: don't delete .pyo files Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Oberritter @ 2012-05-21 20:54 UTC (permalink / raw)
  To: openembedded-core

* 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 |    4 ----
 1 file changed, 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
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] python: bump PR of packages after update of distutils.bbclass
  2012-05-21 20:54 [PATCH 1/2] distutils.bbclass: don't delete .pyo files Andreas Oberritter
@ 2012-05-21 20:54 ` Andreas Oberritter
  2012-05-24 17:57 ` [PATCH 1/2] distutils.bbclass: don't delete .pyo files Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Oberritter @ 2012-05-21 20:54 UTC (permalink / raw)
  To: openembedded-core

* Bump every recipe inheriting distutils or setuptools and
  not overriding do_install without calling distutils_do_install.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 .../python/python-argparse_1.2.1.bb                |    2 +-
 .../python/python-imaging_1.1.7.bb                 |    2 +-
 .../python/python-pycurl_7.19.0.bb                 |    2 +-
 meta/recipes-devtools/python/python-pyrex_0.9.9.bb |    2 +-
 meta/recipes-devtools/python/python-scons_2.1.0.bb |    2 +-
 .../python/python-setuptools_0.6c11.bb             |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/python/python-argparse_1.2.1.bb b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
index 789cee1..7c15575 100644
--- a/meta/recipes-devtools/python/python-argparse_1.2.1.bb
+++ b/meta/recipes-devtools/python/python-argparse_1.2.1.bb
@@ -3,7 +3,7 @@ SECTION = "devel/python"
 LICENSE = "PSF"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=09d08bb5b7047e2688ea3faad6408aa8"
 SRCNAME = "argparse"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://argparse.googlecode.com/files/${SRCNAME}-${PV}.tar.gz"
 SRC_URI[md5sum] = "2fbef8cb61e506c706957ab6e135840c"
diff --git a/meta/recipes-devtools/python/python-imaging_1.1.7.bb b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
index 6d9743e..a36c344 100644
--- a/meta/recipes-devtools/python/python-imaging_1.1.7.bb
+++ b/meta/recipes-devtools/python/python-imaging_1.1.7.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://README;beginline=92;endline=120;md5=c4371af4579f1e489cf881c1443dd4ec"
 DEPENDS = "freetype jpeg tiff"
 SRCNAME = "Imaging"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "http://effbot.org/downloads/Imaging-${PV}.tar.gz \
            file://0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch"
diff --git a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
index 8b849d7..122e1bd 100644
--- a/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
+++ b/meta/recipes-devtools/python/python-pycurl_7.19.0.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://README;endline=13;md5=fbfe545b1869617123a08c0983ef17b
 DEPENDS = "curl python"
 RDEPENDS_${PN} = "python-core curl"
 SRCNAME = "pycurl"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "\
   http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
diff --git a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
index 568fb0d..0ae35b0 100644
--- a/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
+++ b/meta/recipes-devtools/python/python-pyrex_0.9.9.bb
@@ -5,7 +5,7 @@ SECTION = "devel/python"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd"
 SRCNAME = "Pyrex"
-PR = "r3"
+PR = "r4"
 
 SRC_URI = "\
   http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
diff --git a/meta/recipes-devtools/python/python-scons_2.1.0.bb b/meta/recipes-devtools/python/python-scons_2.1.0.bb
index f0b5b1f..8c5aa07 100644
--- a/meta/recipes-devtools/python/python-scons_2.1.0.bb
+++ b/meta/recipes-devtools/python/python-scons_2.1.0.bb
@@ -4,7 +4,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ab8b65435c2e520ed18e67459f1f9bb9"
 SRCNAME = "scons"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
 
diff --git a/meta/recipes-devtools/python/python-setuptools_0.6c11.bb b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb
index 5dd5f31..a769714 100644
--- a/meta/recipes-devtools/python/python-setuptools_0.6c11.bb
+++ b/meta/recipes-devtools/python/python-setuptools_0.6c11.bb
@@ -5,7 +5,7 @@ LICENSE = "PSF"
 LIC_FILES_CHKSUM = "file://setup.py;beginline=23;endline=23;md5=8a314270dd7a8dbca741775415f1716e"
 
 SRCNAME = "setuptools"
-PR = "ml3"
+PR = "ml4"
 DEPENDS += "python"
 DEPENDS_virtclass-native += "python-native"
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] distutils.bbclass: don't delete .pyo files
  2012-05-21 20:54 [PATCH 1/2] distutils.bbclass: don't delete .pyo files Andreas Oberritter
  2012-05-21 20:54 ` [PATCH 2/2] python: bump PR of packages after update of distutils.bbclass Andreas Oberritter
@ 2012-05-24 17:57 ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-05-24 17:57 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 05/21/2012 01:54 PM, Andreas Oberritter wrote:
> * 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 |    4 ----
>   1 file changed, 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


Merged these 2 into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-24 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 20:54 [PATCH 1/2] distutils.bbclass: don't delete .pyo files Andreas Oberritter
2012-05-21 20:54 ` [PATCH 2/2] python: bump PR of packages after update of distutils.bbclass Andreas Oberritter
2012-05-24 17:57 ` [PATCH 1/2] distutils.bbclass: don't delete .pyo files Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox