diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-14 14:31:24 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-18 16:42:07 +0000 |
commit | 89bc43e1b2dcf0d15004b0eb65ea75c6adbfcf8e (patch) | |
tree | 84ec9eb39b1bfba19d02acc2f9a26bee72c3c767 /meta/recipes-devtools/python/python_2.7.3.bb | |
parent | dadb3a7fa70a016fd4bf2b059d37a5e0f759eef1 (diff) | |
download | openembedded-core-contrib-89bc43e1b2dcf0d15004b0eb65ea75c6adbfcf8e.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.
(From OE-Core rev: 16da4f75a75dc8020803df9ea73a2a7ead88cc5a)
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.bb | 25 |
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 \ |