python-2.7.2: always set platform to linux2
PATCH 1/2 python-2.7.2: always set platform to linux2
* Fixes many problems with linux2 vs. linux3. At least:
- Detected version was from build-host instead of target-host.
- linuxaudiodev and ossaudiodev were disabled for linux3.
- Files were missing in /usr/lib/python2.7/plat-linux3.
* Imported from upstream HG rev c816479f6aaf
* Bugtracker URL: http://bugs.python.org/issue12326
Signed-off-by Andreas Oberritter <[email protected]>
--- .../sys_platform_is_now_always_linux2.patch | 39 ++++++++++++++++++++ .../recipes-devtools/python/python-native_2.7.2.bb | 3 +- .../python/python/07-linux3-regen-fix.patch | 18 --------- .../python/sys_platform_is_now_always_linux2.patch | 39 ++++++++++++++++++++ meta/recipes-devtools/python/python_2.7.2.bb | 4 +- 5 files changed, 82 insertions(+), 21 deletions(-) create mode 100644 meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch delete mode 100644 meta/recipes-devtools/python/python/07-linux3-regen-fix.patch create mode 100644 meta/recipes-devtools/python/python/sys_platform_is_now_always_linux2.patch
meta/recipes-devtools/python/python-native/sys_platform_is_now_always_linux2.patch new file +39 -0
@@ -0,0 +1,39 @@ +Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/] +Bugtracker: http://bugs.python.org/issue12326 + +[Removed "Misc/NEWS" hunk] + +Signed-off-by: Andreas Oberritter <[email protected]> + +# HG changeset patch +# User Victor Stinner <[email protected]> +# Date 1313841758 -7200 +# Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48 +# Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b +Issue #12326: sys.platform is now always 'linux2' on Linux + +Even if Python is compiled on Linux 3. + +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -2995,6 +2995,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -293,6 +293,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; +
meta/recipes-devtools/python/python-native_2.7.2.bb +2 -1
@@ -1,6 +1,6 @@ require python.inc DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native" -PR = "${INC_PR}.3" +PR = "${INC_PR}.4" SRC_URI += "file://04-default-is-optimized.patch \ file://05-enable-ctypes-cross-build.patch \
@@ -13,6 +13,7 @@ SRC_URI += "file://04-default-is-optimized.patch \ file://nohostlibs.patch \ file://multilib.patch \ file://add-md5module-support.patch \ + file://sys_platform_is_now_always_linux2.patch \ " S = "${WORKDIR}/Python-${PV}"
meta/recipes-devtools/python/python/07-linux3-regen-fix.patch deleted +0 -18
@@ -1,18 +0,0 @@ -Upstream-Status: Inappropriate [embedded specific] - -Without this patch it calls cross-compiled python if host is running linux-3.0 -python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h -| ./regen: line 3: /OE/shr-core/tmp/work/armv4t-oe-linux-gnueabi/python-2.6.6-nk2.8/Python-2.6.6/python: cannot execute binary file - -diff -uNr Python-2.6.6.orig//Lib/plat-linux3/regen Python-2.6.6/Lib/plat-linux3/regen ---- Python-2.6.6.orig//Lib/plat-linux3/regen 1970-01-01 01:00:00.000000000 +0100 -+++ Python-2.6.6/Lib/plat-linux3/regen 2001-08-09 14:48:17.000000000 +0200 -@@ -0,0 +1,8 @@ -+#! /bin/sh -+case `uname` in -+Linux*) ;; -+*) echo Probably not on a Linux system 1>&2 -+ exit 1;; -+esac -+set -v -+h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h
meta/recipes-devtools/python/python/sys_platform_is_now_always_linux2.patch new file +39 -0
@@ -0,0 +1,39 @@ +Upstream-Status: Accepted [http://hg.python.org/cpython/rev/c816479f6aaf/] +Bugtracker: http://bugs.python.org/issue12326 + +[Removed "Misc/NEWS" hunk] + +Signed-off-by: Andreas Oberritter <[email protected]> + +# HG changeset patch +# User Victor Stinner <[email protected]> +# Date 1313841758 -7200 +# Node ID c816479f6aaf71dbd3f3fe4b239186d60c55ce48 +# Parent 3e093590ac57fdda428c7da3f72ddf0c475ecf2b +Issue #12326: sys.platform is now always 'linux2' on Linux + +Even if Python is compiled on Linux 3. + +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -2995,6 +2995,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -293,6 +293,7 @@ then + MACHDEP="$ac_md_system$ac_md_release" + + case $MACHDEP in ++ linux*) MACHDEP="linux2";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; + atheos*) MACHDEP="atheos";; +
meta/recipes-devtools/python/python_2.7.2.bb +2 -2
@@ -1,7 +1,7 @@ require python.inc DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" -PR = "${INC_PR}.6" +PR = "${INC_PR}.7" DISTRO_SRC_URI ?= "file://sitecustomize.py" DISTRO_SRC_URI_linuxstdbase = ""
@@ -12,7 +12,6 @@ SRC_URI += "\ file://05-enable-ctypes-cross-build.patch \ file://06-ctypes-libffi-fix-configure.patch \ file://06-avoid_usr_lib_termcap_path_in_linking.patch \ - file://07-linux3-regen-fix.patch \ file://99-ignore-optimization-flag.patch \ ${DISTRO_SRC_URI} \ file://multilib.patch \
@@ -21,6 +20,7 @@ SRC_URI += "\ file://setup_py_skip_cross_import_check.patch \ file://add-md5module-support.patch \ file://host_include_contamination.patch \ + file://sys_platform_is_now_always_linux2.patch \ " S = "${WORKDIR}/Python-${PV}"
Signature · 1 line
1.7.7
PATCH 2/2 python-2.7.2: depend on bzip2
* Python auto-detects libbz2 and there's no way to force-disable it, so just enable it.
* Adds bz2 support to python-compression.
Signed-off-by Andreas Oberritter <[email protected]>
--- meta/recipes-devtools/python/python_2.7.2.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-devtools/python/python_2.7.2.bb +2 -2
@@ -1,7 +1,7 @@ require python.inc -DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib" +DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" DEPENDS_sharprom = "python-native db readline zlib gdbm openssl" -PR = "${INC_PR}.7" +PR = "${INC_PR}.8" DISTRO_SRC_URI ?= "file://sitecustomize.py" DISTRO_SRC_URI_linuxstdbase = ""
Signature · 1 line
1.7.7