summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.2.bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-23 22:46:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-23 23:07:19 +0100
commit90705b36ad37dffe3a7a4f788bfc5cef46eac3e5 (patch)
treea59f8c376247349c455e413629dd958bce94a759 /meta/recipes-devtools/python/python_2.7.2.bb
parentbe5a5c7e7bd9140d0043b6fe00d1a41f1d29e3ea (diff)
downloadpoky-90705b36ad37dffe3a7a4f788bfc5cef46eac3e5.tar.gz
python: Fix various contamination issues leading to broken/missing c modules
The move of libcrypto to /lib instead of /usr/lib has broken the _hashlib module compilation. There were also a number of other failing modules which should have been building correctly. This turned out partly to be the /lib issue but also due to a number of native paths creeping into compiler commandlines. These changes add in /lib as part of the searh directory and remove a number of host contamination issues within setup.py. Post release we should really further go through this file and just delete large sections of it as its hard to be sure what strange paths python is injecting as search paths. This patch also fixes issues where re-execution of the compile task would corrupt the Makefile in various ways, again leading to puzzling paths within the configuration. (From OE-Core rev: 20e2761e1da1cb5dcd267e161f2a6b6a429e9f39) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.2.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.2.bb22
1 files changed, 17 insertions, 5 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb
index 95e17a83d6..e067ba50fc 100644
--- a/meta/recipes-devtools/python/python_2.7.2.bb
+++ b/meta/recipes-devtools/python/python_2.7.2.bb
@@ -1,6 +1,6 @@
1require python.inc 1require python.inc
2DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib" 2DEPENDS = "python-native bzip2 db gdbm openssl readline sqlite3 zlib"
3PR = "${INC_PR}.12" 3PR = "${INC_PR}.14"
4 4
5DISTRO_SRC_URI ?= "file://sitecustomize.py" 5DISTRO_SRC_URI ?= "file://sitecustomize.py"
6DISTRO_SRC_URI_linuxstdbase = "" 6DISTRO_SRC_URI_linuxstdbase = ""
@@ -21,6 +21,7 @@ SRC_URI += "\
21 file://host_include_contamination.patch \ 21 file://host_include_contamination.patch \
22 file://sys_platform_is_now_always_linux2.patch \ 22 file://sys_platform_is_now_always_linux2.patch \
23 file://fix_for_using_different_libdir.patch \ 23 file://fix_for_using_different_libdir.patch \
24 file://setuptweaks.patch \
24" 25"
25 26
26S = "${WORKDIR}/Python-${PV}" 27S = "${WORKDIR}/Python-${PV}"
@@ -33,6 +34,7 @@ TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
33TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" 34TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
34 35
35do_configure_prepend() { 36do_configure_prepend() {
37 rm -f ${S}/Makefile.orig
36 autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf" 38 autoreconf -Wcross --verbose --install --force --exclude=autopoint Modules/_ctypes/libffi || bbnote "_ctypes failed to autoreconf"
37} 39}
38 40
@@ -65,10 +67,17 @@ do_compile() {
65 # remove any bogus LD_LIBRARY_PATH 67 # remove any bogus LD_LIBRARY_PATH
66 sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile 68 sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
67 69
68 install -m 0644 Makefile Makefile.orig 70 if [ ! -f Makefile.orig ]; then
69 sed -i -e 's,${includedir},${STAGING_INCDIR},' Makefile 71 install -m 0644 Makefile Makefile.orig
70 sed -i -e 's,${libdir},${STAGING_LIBDIR},' Makefile 72 fi
71 sed -i -e 's,LDFLAGS=,LDFLAGS=-L. -L${STAGING_LIBDIR},' Makefile 73 sed -i -e 's,^LDFLAGS=.*,LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
74 -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
75 -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
76 -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
77 -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
78 -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
79 -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
80 Makefile
72 install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/ 81 install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
73 # save copy of it now, because if we do it in do_install and 82 # save copy of it now, because if we do it in do_install and
74 # then call do_install twice we get Makefile.orig == Makefile.sysroot 83 # then call do_install twice we get Makefile.orig == Makefile.sysroot
@@ -79,6 +88,7 @@ do_compile() {
79 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \ 88 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
80 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ 89 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
81 STAGING_LIBDIR=${STAGING_LIBDIR} \ 90 STAGING_LIBDIR=${STAGING_LIBDIR} \
91 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
82 STAGING_INCDIR=${STAGING_INCDIR} \ 92 STAGING_INCDIR=${STAGING_INCDIR} \
83 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ 93 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
84 OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so 94 OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
@@ -89,6 +99,7 @@ do_compile() {
89 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \ 99 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
90 STAGING_LIBDIR=${STAGING_LIBDIR} \ 100 STAGING_LIBDIR=${STAGING_LIBDIR} \
91 STAGING_INCDIR=${STAGING_INCDIR} \ 101 STAGING_INCDIR=${STAGING_INCDIR} \
102 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
92 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ 103 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
93 OPT="${CFLAGS}" 104 OPT="${CFLAGS}"
94} 105}
@@ -105,6 +116,7 @@ do_install() {
105 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \ 116 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
106 STAGING_LIBDIR=${STAGING_LIBDIR} \ 117 STAGING_LIBDIR=${STAGING_LIBDIR} \
107 STAGING_INCDIR=${STAGING_INCDIR} \ 118 STAGING_INCDIR=${STAGING_INCDIR} \
119 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
108 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ 120 BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
109 DESTDIR=${D} LIBDIR=${libdir} install 121 DESTDIR=${D} LIBDIR=${libdir} install
110 122