aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python_2.7.3.bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-14 14:31:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-18 11:45:05 +0000
commit16da4f75a75dc8020803df9ea73a2a7ead88cc5a (patch)
treec42b4815e7bfc0155f3bcd347c5b40a114259552 /meta/recipes-devtools/python/python_2.7.3.bb
parent57127ff6f42145bb1a200c8c3267158df637fbfd (diff)
downloadopenembedded-core-16da4f75a75dc8020803df9ea73a2a7ead88cc5a.tar.gz
python: Resolve intermediate staging issues
Its bad practise to poke into the sysroot without knowledge of sstate. This adds a patch to python allowing us to account for cross compiling and allow it to find the Makefile/pyconfig.h files without needing them in the sysroot for do_compile/do_install to complete. Tested on two architectures and compared with buildhistory with no significant delta. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.3.bb')
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb25
1 files changed, 3 insertions, 22 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 3a17c85bb8..f0d5c90d30 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -27,6 +27,7 @@ SRC_URI += "\
file://avoid_warning_for_sunos_specific_module.patch \
file://python-2.7.3-berkeley-db-5.3.patch \
file://python-2.7.3-remove-bsdb-rpath.patch \
+ file://builddir.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -55,17 +56,6 @@ do_compile() {
sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
cd -
- #
- # Copy config.h and an appropriate Makefile for distutils.sysconfig,
- # which laters uses the information out of these to compile extensions
- #
- # The following part (until python compilation) should probably moved to an
- # -initial recipe to handle staging better
- #
- install -d ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
- install -d ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
- install -m 0644 pyconfig.h ${STAGING_INCDIR}/python${PYTHON_MAJMIN}/
-
# remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144
sed -i -e s,ccache,'$(CCACHE)', Makefile
@@ -83,22 +73,12 @@ do_compile() {
-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
Makefile
- install -m 0644 Makefile ${STAGING_LIBDIR}/python${PYTHON_MAJMIN}/config/
# save copy of it now, because if we do it in do_install and
# then call do_install twice we get Makefile.orig == Makefile.sysroot
install -m 0644 Makefile Makefile.sysroot
export CROSS_COMPILE="${TARGET_PREFIX}"
-
- oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
- HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
- STAGING_LIBDIR=${STAGING_LIBDIR} \
- STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
- STAGING_INCDIR=${STAGING_INCDIR} \
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- OPT="${CFLAGS}" libpython${PYTHON_MAJMIN}.so
-
- oe_libinstall -so libpython${PYTHON_MAJMIN} ${STAGING_LIBDIR}
+ export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
@@ -115,6 +95,7 @@ do_install() {
install -m 0644 Makefile.orig Makefile
export CROSS_COMPILE="${TARGET_PREFIX}"
+ export PYTHONBUILDDIR="${S}"
oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \