python[-native] 2.5.1: add patch to compile everything in optimized bytecode.
authorMichael Lauer <mickey@vanille-media.de>
Wed, 15 Aug 2007 20:06:49 +0000 (20:06 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Wed, 15 Aug 2007 20:06:49 +0000 (20:06 +0000)
This also reduces the packaging size / flash consumption

packages/python/python-2.5.1/default-is-optimizied.patch [new file with mode: 0644]
packages/python/python-native-2.5.1/default-is-optimizied.patch [new file with mode: 0644]
packages/python/python-native_2.5.1.bb
packages/python/python_2.5.1.bb

diff --git a/packages/python/python-2.5.1/default-is-optimizied.patch b/packages/python/python-2.5.1/default-is-optimizied.patch
new file mode 100644 (file)
index 0000000..6beeb6e
--- /dev/null
@@ -0,0 +1,13 @@
+Index: Python-2.5.1/Python/compile.c
+===================================================================
+--- Python-2.5.1.orig/Python/compile.c
++++ Python-2.5.1/Python/compile.c
+@@ -30,7 +30,7 @@
+ #include "symtable.h"
+ #include "opcode.h"
+-int Py_OptimizeFlag = 0;
++int Py_OptimizeFlag = 1;
+ /*
+   ISSUES:
diff --git a/packages/python/python-native-2.5.1/default-is-optimizied.patch b/packages/python/python-native-2.5.1/default-is-optimizied.patch
new file mode 100644 (file)
index 0000000..6beeb6e
--- /dev/null
@@ -0,0 +1,13 @@
+Index: Python-2.5.1/Python/compile.c
+===================================================================
+--- Python-2.5.1.orig/Python/compile.c
++++ Python-2.5.1/Python/compile.c
+@@ -30,7 +30,7 @@
+ #include "symtable.h"
+ #include "opcode.h"
+-int Py_OptimizeFlag = 0;
++int Py_OptimizeFlag = 1;
+ /*
+   ISSUES:
index e0b09cb..fdaefe5 100644 (file)
@@ -11,7 +11,8 @@ EXCLUDE_FROM_WORLD = "1"
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
            file://bindir-libdir.patch;patch=1 \
            file://cross-distutils.patch;patch=1 \
-           file://dont-modify-shebang-line.patch;patch=1"
+           file://dont-modify-shebang-line.patch;patch=1 \
+           file://default-is-optimized.patch;patch=1"
 S = "${WORKDIR}/Python-${PV}"
 
 inherit autotools native
index a9d37a1..6cf1473 100644 (file)
@@ -14,7 +14,8 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
            file://crosscompile.patch;patch=1 \
            file://fix-tkinter-detection.patch;patch=1 \
            file://autohell.patch;patch=1 \
-           file://sitebranding.patch;patch=1"
+           file://sitebranding.patch;patch=1 \
+           file://default-is-optimized.patch;patch=1"
 S = "${WORKDIR}/Python-${PV}"
 
 inherit autotools