[OE-core] [PATCH]] python: Unbreak Python third-party extensions

Richard Purdie richard.purdie at linuxfoundation.org
Tue May 3 10:50:50 UTC 2011


On Fri, 2011-04-29 at 12:44 +0200, Michael Lippautz wrote:
> This fixes compilation/linking of Python 3rd party extensions.
> 
> ${STAGING_LIBDIR}/python<pyver>/config/Makefile needs the correct
> INCDIR and LIBDIR settings to be used in cross compilation for the
> target. 3rd party module use distutils.sysconfig which uses this
> Makefile to create compiler/linker flags.
> 
> Workflow:
> 1) compile needs the staged/sysroot Makefile since it is needed
>    for compilation/linking
> 2) install needs the unmodified Makefile to install files (i.e.
>    headers) into the right directores. (otherwise they would be
>    installed in ${D}/${STAGING_...}
> 3) staging needs modified Makefile again
> 4) packaging needs unmodified to make compilation on the target
>    possible
> 
> Signed-off-by: Michael Lippautz <michael.lippautz at gmail.com>
> ---
>  meta/recipes-devtools/python/python_2.6.6.bb |   25 +++++++++++++++++++------
>  1 files changed, 19 insertions(+), 6 deletions(-)

I'm ok with this patch but I am a little worried looking at the python
recipe that it won't interact well with sstate. I'd therefore like to
fix this whilst we have someone who understands this code around.

The problem is that do_compile_prepend() is poking files directly into
staging. Instead, do_install should be manipulating things in ${D}
instead and then PACKAGE_PREPROCESS_FUNCS and SYSROOT_PREPROCESS_FUNCS
should be taking care of any fixups for the target/sysroot cases.

Can we add the code in the do_compile_prepend() to the start of the
do_install() ?

Cheers,

Richard





More information about the Openembedded-core mailing list