From: Saul Wold <sgw@linux.intel.com>
To: 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 10:58:33 -0700 [thread overview]
Message-ID: <4F5E3949.7050307@linux.intel.com> (raw)
In-Reply-To: <1331154474-17257-1-git-send-email-obi@opendreambox.org>
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.
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
How have you tested this change?
Sau!
> diff --git a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
> index b46caf6..7b743e5 100644
> --- a/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
> +++ b/meta/recipes-devtools/python/python-native/12-distutils-prefix-is-inside-staging-area.patch
> @@ -26,26 +26,21 @@ Upstream-Status: Inappropriate [embedded specific]
>
> if os.name == "posix":
> if python_build:
> -@@ -115,12 +115,16 @@
> - If 'prefix' is supplied, use it instead of sys.prefix or
> +@@ -116,11 +116,11 @@
> sys.exec_prefix -- i.e., ignore 'plat_specific'.
> """
> -+ lib_basename = os.getenv("libdir").split('/')[-1]
> if prefix is None:
> - prefix = plat_specific and EXEC_PREFIX or PREFIX
> -+ if plat_specific:
> -+ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
> -+ else:
> -+ prefix = plat_specific and EXEC_PREFIX or PREFIX
> ++ prefix = plat_specific and os.environ['STAGING_LIBDIR'].rstrip(sys.lib) or PREFIX
>
> if os.name == "posix":
> libpython = os.path.join(prefix,
> - "lib", "python" + get_python_version())
> -+ lib_basename, "python" + get_python_version())
> ++ sys.lib, "python" + get_python_version())
> if standard_lib:
> return libpython
> else:
> -@@ -216,7 +220,7 @@
> +@@ -216,7 +216,7 @@
> else:
> # The name of the config.h file changed in 2.2
> config_h = 'pyconfig.h'
> @@ -54,7 +49,7 @@ Upstream-Status: Inappropriate [embedded specific]
>
>
> def get_makefile_filename():
> -@@ -225,7 +229,7 @@
> +@@ -225,7 +225,7 @@
> return os.path.join(os.path.dirname(os.path.realpath(sys.executable)),
> "Makefile")
> lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
next prev parent reply other threads:[~2012-03-12 18:07 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 [this message]
2012-03-12 19:22 ` Andreas Oberritter
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=4F5E3949.7050307@linux.intel.com \
--to=sgw@linux.intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.