Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: Saul Wold <sgw@linux.intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH][resend] python-native: distutils: don't use libdir, remove dead code path
Date: Mon, 12 Mar 2012 20:22:33 +0100	[thread overview]
Message-ID: <4F5E4CF9.3070104@opendreambox.org> (raw)
In-Reply-To: <4F5E3949.7050307@linux.intel.com>

On 12.03.2012 18:58, Saul Wold wrote:
> On 03/07/2012 01:07 PM, Andreas Oberritter wrote:
>> * Coming from OE-classic it was surprising that python-native now
>>    requires 'libdir' to be exported. Otherwise autoconf would fail
>>    to detect python libraries. This happend using a customized
>>    environment setup script to use OE's compiler and libs without
>>    bitbake.
>> * Use sys.lib instead of libdir's suffix.
>> * While at it, simplify redundant if/and-statments.
>>
>> Signed-off-by: Andreas Oberritter<obi@opendreambox.org>
>> ---
>> * This patch hasn't been commented since its first submission
>>    on Feb 21st.
>> * Original patch URL: http://patches.openembedded.org/patch/21481/
>>
>>   ...2-distutils-prefix-is-inside-staging-area.patch |   15
>> +++++----------
>>   1 files changed, 5 insertions(+), 10 deletions(-)
>>
> This will need a PR bump so the modified patch will be noticed, I know
> this patch was put in a while ago.

Right. I'm waiting before resubmitting it. See below.

> I am not so sure about the changes though, I have been meaning to dig
> into this, the orignial code looks strange in that it includes
> plat_specific in the else clause!  You are also dropping the EXEC_PREFIX

I'm dropping EXEC_PREFIX, because it's dead code.

The code from the original patch can be rewritten as:

if plat_specific:
	if plat_specific:
		prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
else:
	if plat_specific:
		prefix = EXEC_PREFIX
	else:
		prefix = PREFIX

Does this make it clear?
 
> How have you tested this change?

I built from scratch and also runtime tested it, but without multilib. 

As I'm currently investing a different problem in python, digging into
python internals, I doubt that sys.lib really contains the correct
value for multilib, unless multilib builds have multiple python-natives.

I think it would be better to just drop the last element of STAGING_LIBDIR,
i.e.:

if plat_specific:
	prefix = '/'.join(os.environ['STAGING_LIBDIR'].split('/')[:-1])
else:
	prefix = PREFIX

Do you think this would be OK?

Regards,
Andreas



  reply	other threads:[~2012-03-12 19:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 21:07 [PATCH][resend] python-native: distutils: don't use libdir, remove dead code path Andreas Oberritter
2012-03-12 17:58 ` Saul Wold
2012-03-12 19:22   ` Andreas Oberritter [this message]
2012-03-17  0:30     ` Richard Purdie
2012-03-17 11:01       ` Richard Purdie

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=4F5E4CF9.3070104@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw@linux.intel.com \
    /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