From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCHv2] python: Unbreak Python third-party extensions
Date: Wed, 04 May 2011 08:59:06 +0100 [thread overview]
Message-ID: <1304495946.21461.153.camel@rex> (raw)
In-Reply-To: <1304440834-4253-1-git-send-email-michael.lippautz@gmail.com>
On Tue, 2011-05-03 at 18:40 +0200, Michael Lippautz wrote:
> This patch fixes compilation/linking of python third-party extensions, i.e.
> Extensions that ship with C code.
>
> Problem:
> Python uses distutils(-native) to compile third-party extensions. distutils
> uses its own sysconfig module to get the options for compiling and linking.
> Since third-party extensions have to be linked against this libpython it
> important that -L points into staging. This is not the case because
> distutils.sysconfig uses a special Makefile that is shipped with python
> determine the paths. The Makefile is the same that would be used on the
> target to build third-party extensions. It therefore points into /usr/lib
> instead of staging.
>
> Solution:
> Stage a modified version of the Makefile where the paths (incdir, libdir) have
> been replaced by ones that point into staging.
>
> Side-problem:
> The recipe actually should not stage files itself in do_compile, but rather
> handle everything that needs to be staged in do_install. This is currently not
> possible because python compiles itself using distutils-native. Distutils on
> the other hand does only allow to add a path, but not to substitute it,
> requiring a staged Makefile and libpython.so before the actual python
> compilation is triggered.
>
> The second step to solve this would be to either patch distutils, or split
> python into python-initial and python. The -initial part could create the
> Makefile and the library, while the main part focuses on the target.
>
> For further references see:
> http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/001752.html
>
> Signed-off-by: Michael Lippautz <michael.lippautz@gmail.com>
> Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> meta/recipes-devtools/python/python_2.6.6.bb | 41 +++++++++++++++++---------
> 1 files changed, 27 insertions(+), 14 deletions(-)
Merged to master, thanks.
Richard
prev parent reply other threads:[~2011-05-04 8:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 16:40 [PATCHv2] python: Unbreak Python third-party extensions Michael Lippautz
2011-05-04 7:59 ` Richard Purdie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304495946.21461.153.camel@rex \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox