* [PATCH] python-native: correct prefix handling for oe-core sysroot layout
@ 2012-01-03 17:39 Phil Blundell
2012-01-03 17:47 ` Martin Jansa
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2012-01-03 17:39 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Don't try to guess a path based on ${HOST_SYS} since this is not where the
files in the sysroot are likely to be. Instead, just use the "plat_specific"
approach of taking STAGING_INCDIR and knocking off the trailing "/include" for
all cases. This is still evidently suboptimal but does at least seem to give
the correct results.
Signed-off-by: Phil Blundell <philb@gnu.org>
---
...2-distutils-prefix-is-inside-staging-area.patch | 22 ++++++++-----------
.../recipes-devtools/python/python-native_2.6.6.bb | 2 +-
2 files changed, 10 insertions(+), 14 deletions(-)
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 8e721fe..b46caf6 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
@@ -2,12 +2,11 @@ Upstream-Status: Inappropriate [embedded specific]
# The proper prefix is inside our staging area.
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+# Signed-off-by: Phil Blundell <philb@gnu.org>
-Index: Python-2.6.6/Lib/distutils/sysconfig.py
-===================================================================
---- Python-2.6.6.orig/Lib/distutils/sysconfig.py
-+++ Python-2.6.6/Lib/distutils/sysconfig.py
-@@ -19,8 +19,8 @@ import sys
+--- Python-2.6.6/Lib/distutils/sysconfig.py.orig 2012-01-03 14:02:03.027005296 +0000
++++ Python-2.6.6/Lib/distutils/sysconfig.py 2012-01-03 14:02:31.517601081 +0000
+@@ -19,8 +19,8 @@
from distutils.errors import DistutilsPlatformError
# These are needed in a couple of spots, so just compute them once.
@@ -18,19 +17,16 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild9. If we're dealing with an x64 Windows build,
-@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
+@@ -70,7 +70,7 @@
sys.exec_prefix -- i.e., ignore 'plat_specific'.
"""
if prefix is None:
- prefix = plat_specific and EXEC_PREFIX or PREFIX
-+ if plat_specific:
-+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
-+ else:
-+ prefix = plat_specific and EXEC_PREFIX or PREFIX
++ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
if os.name == "posix":
if python_build:
-@@ -115,12 +118,16 @@ def get_python_lib(plat_specific=0, stan
+@@ -115,12 +115,16 @@
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
"""
@@ -49,7 +45,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
if standard_lib:
return libpython
else:
-@@ -216,7 +223,7 @@ def get_config_h_filename():
+@@ -216,7 +220,7 @@
else:
# The name of the config.h file changed in 2.2
config_h = 'pyconfig.h'
@@ -58,7 +54,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
def get_makefile_filename():
-@@ -225,7 +232,7 @@ def get_makefile_filename():
+@@ -225,7 +229,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)
diff --git a/meta/recipes-devtools/python/python-native_2.6.6.bb b/meta/recipes-devtools/python/python-native_2.6.6.bb
index e0a4fb3..9293f03 100644
--- a/meta/recipes-devtools/python/python-native_2.6.6.bb
+++ b/meta/recipes-devtools/python/python-native_2.6.6.bb
@@ -1,6 +1,6 @@
require python.inc
DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
-PR = "${INC_PR}.4"
+PR = "${INC_PR}.5"
LIC_FILES_CHKSUM = "file://LICENSE;md5=38fdd546420fab09ac6bd3d8a1c83eb6"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: correct prefix handling for oe-core sysroot layout
2012-01-03 17:39 Phil Blundell
@ 2012-01-03 17:47 ` Martin Jansa
2012-01-03 18:01 ` Phil Blundell
0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2012-01-03 17:47 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 4810 bytes --]
On Tue, Jan 03, 2012 at 05:39:35PM +0000, Phil Blundell wrote:
> Don't try to guess a path based on ${HOST_SYS} since this is not where the
> files in the sysroot are likely to be. Instead, just use the "plat_specific"
> approach of taking STAGING_INCDIR and knocking off the trailing "/include" for
> all cases. This is still evidently suboptimal but does at least seem to give
> the correct results.
>
> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
> ...2-distutils-prefix-is-inside-staging-area.patch | 22 ++++++++-----------
> .../recipes-devtools/python/python-native_2.6.6.bb | 2 +-
> 2 files changed, 10 insertions(+), 14 deletions(-)
Where did you get python-native_2.6.6?
That was removed with 2.7.2 upgrade in
commit b284e9a512860b8a8380be80f96cebce6b92ff80
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date: Fri Oct 14 07:06:13 2011 +0000
Cheers,
>
> 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 8e721fe..b46caf6 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
> @@ -2,12 +2,11 @@ Upstream-Status: Inappropriate [embedded specific]
>
> # The proper prefix is inside our staging area.
> # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
> +# Signed-off-by: Phil Blundell <philb@gnu.org>
>
> -Index: Python-2.6.6/Lib/distutils/sysconfig.py
> -===================================================================
> ---- Python-2.6.6.orig/Lib/distutils/sysconfig.py
> -+++ Python-2.6.6/Lib/distutils/sysconfig.py
> -@@ -19,8 +19,8 @@ import sys
> +--- Python-2.6.6/Lib/distutils/sysconfig.py.orig 2012-01-03 14:02:03.027005296 +0000
> ++++ Python-2.6.6/Lib/distutils/sysconfig.py 2012-01-03 14:02:31.517601081 +0000
> +@@ -19,8 +19,8 @@
> from distutils.errors import DistutilsPlatformError
>
> # These are needed in a couple of spots, so just compute them once.
> @@ -18,19 +17,16 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
>
> # Path to the base directory of the project. On Windows the binary may
> # live in project/PCBuild9. If we're dealing with an x64 Windows build,
> -@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
> +@@ -70,7 +70,7 @@
> sys.exec_prefix -- i.e., ignore 'plat_specific'.
> """
> if prefix is None:
> - prefix = plat_specific and EXEC_PREFIX or PREFIX
> -+ if plat_specific:
> -+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
> -+ else:
> -+ prefix = plat_specific and EXEC_PREFIX or PREFIX
> ++ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
>
> if os.name == "posix":
> if python_build:
> -@@ -115,12 +118,16 @@ def get_python_lib(plat_specific=0, stan
> +@@ -115,12 +115,16 @@
> If 'prefix' is supplied, use it instead of sys.prefix or
> sys.exec_prefix -- i.e., ignore 'plat_specific'.
> """
> @@ -49,7 +45,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
> if standard_lib:
> return libpython
> else:
> -@@ -216,7 +223,7 @@ def get_config_h_filename():
> +@@ -216,7 +220,7 @@
> else:
> # The name of the config.h file changed in 2.2
> config_h = 'pyconfig.h'
> @@ -58,7 +54,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
>
>
> def get_makefile_filename():
> -@@ -225,7 +232,7 @@ def get_makefile_filename():
> +@@ -225,7 +229,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)
> diff --git a/meta/recipes-devtools/python/python-native_2.6.6.bb b/meta/recipes-devtools/python/python-native_2.6.6.bb
> index e0a4fb3..9293f03 100644
> --- a/meta/recipes-devtools/python/python-native_2.6.6.bb
> +++ b/meta/recipes-devtools/python/python-native_2.6.6.bb
> @@ -1,6 +1,6 @@
> require python.inc
> DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
> -PR = "${INC_PR}.4"
> +PR = "${INC_PR}.5"
>
> LIC_FILES_CHKSUM = "file://LICENSE;md5=38fdd546420fab09ac6bd3d8a1c83eb6"
>
> --
> 1.7.4.1
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: correct prefix handling for oe-core sysroot layout
2012-01-03 17:47 ` Martin Jansa
@ 2012-01-03 18:01 ` Phil Blundell
0 siblings, 0 replies; 5+ messages in thread
From: Phil Blundell @ 2012-01-03 18:01 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Tue, 2012-01-03 at 18:47 +0100, Martin Jansa wrote:
> Where did you get python-native_2.6.6?
>
> That was removed with 2.7.2 upgrade in
> commit b284e9a512860b8a8380be80f96cebce6b92ff80
> Author: Nitin A Kamble <nitin.a.kamble@intel.com>
> Date: Fri Oct 14 07:06:13 2011 +0000
>
> Cheers,
Ah yes, sorry, I made the patch against the wrong repository. 2.7.2
still seems to be broken in the same way, though. I'll rebase the patch
tomorrow and send a new one.
p.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: correct prefix handling for oe-core sysroot layout
@ 2012-01-04 17:10 Phil Blundell
2012-01-05 20:24 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Phil Blundell @ 2012-01-04 17:10 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Don't try to guess a path based on ${HOST_SYS} since this is not where the
files in the sysroot are likely to be. Instead, just use the "plat_specific"
approach of taking STAGING_INCDIR and knocking off the trailing "/include" for
all cases. This is still evidently suboptimal but does at least seem to give
the correct results.
Signed-off-by: Phil Blundell <philb@gnu.org>
---
v2: python 2.7.2 not python 2.6.6
...2-distutils-prefix-is-inside-staging-area.patch | 22 ++++++++-----------
.../recipes-devtools/python/python-native_2.7.2.bb | 2 +-
2 files changed, 10 insertions(+), 14 deletions(-)
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 8e721fe..b46caf6 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
@@ -2,12 +2,11 @@ Upstream-Status: Inappropriate [embedded specific]
# The proper prefix is inside our staging area.
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
+# Signed-off-by: Phil Blundell <philb@gnu.org>
-Index: Python-2.6.6/Lib/distutils/sysconfig.py
-===================================================================
---- Python-2.6.6.orig/Lib/distutils/sysconfig.py
-+++ Python-2.6.6/Lib/distutils/sysconfig.py
-@@ -19,8 +19,8 @@ import sys
+--- Python-2.6.6/Lib/distutils/sysconfig.py.orig 2012-01-03 14:02:03.027005296 +0000
++++ Python-2.6.6/Lib/distutils/sysconfig.py 2012-01-03 14:02:31.517601081 +0000
+@@ -19,8 +19,8 @@
from distutils.errors import DistutilsPlatformError
# These are needed in a couple of spots, so just compute them once.
@@ -18,19 +17,16 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild9. If we're dealing with an x64 Windows build,
-@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
+@@ -70,7 +70,7 @@
sys.exec_prefix -- i.e., ignore 'plat_specific'.
"""
if prefix is None:
- prefix = plat_specific and EXEC_PREFIX or PREFIX
-+ if plat_specific:
-+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
-+ else:
-+ prefix = plat_specific and EXEC_PREFIX or PREFIX
++ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
if os.name == "posix":
if python_build:
-@@ -115,12 +118,16 @@ def get_python_lib(plat_specific=0, stan
+@@ -115,12 +115,16 @@
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
"""
@@ -49,7 +45,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
if standard_lib:
return libpython
else:
-@@ -216,7 +223,7 @@ def get_config_h_filename():
+@@ -216,7 +220,7 @@
else:
# The name of the config.h file changed in 2.2
config_h = 'pyconfig.h'
@@ -58,7 +54,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
def get_makefile_filename():
-@@ -225,7 +232,7 @@ def get_makefile_filename():
+@@ -225,7 +229,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)
diff --git a/meta/recipes-devtools/python/python-native_2.7.2.bb b/meta/recipes-devtools/python/python-native_2.7.2.bb
index 7d8c597..8bf736d 100644
--- a/meta/recipes-devtools/python/python-native_2.7.2.bb
+++ b/meta/recipes-devtools/python/python-native_2.7.2.bb
@@ -1,6 +1,6 @@
require python.inc
DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
SRC_URI += "file://04-default-is-optimized.patch \
file://05-enable-ctypes-cross-build.patch \
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] python-native: correct prefix handling for oe-core sysroot layout
2012-01-04 17:10 [PATCH] python-native: correct prefix handling for oe-core sysroot layout Phil Blundell
@ 2012-01-05 20:24 ` Saul Wold
0 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-01-05 20:24 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Phil Blundell
On 01/04/2012 09:10 AM, Phil Blundell wrote:
> Don't try to guess a path based on ${HOST_SYS} since this is not where the
> files in the sysroot are likely to be. Instead, just use the "plat_specific"
> approach of taking STAGING_INCDIR and knocking off the trailing "/include" for
> all cases. This is still evidently suboptimal but does at least seem to give
> the correct results.
>
> Signed-off-by: Phil Blundell<philb@gnu.org>
> ---
> v2: python 2.7.2 not python 2.6.6
>
> ...2-distutils-prefix-is-inside-staging-area.patch | 22 ++++++++-----------
> .../recipes-devtools/python/python-native_2.7.2.bb | 2 +-
> 2 files changed, 10 insertions(+), 14 deletions(-)
>
Merged into OE-Core
Thanks
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 8e721fe..b46caf6 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
> @@ -2,12 +2,11 @@ Upstream-Status: Inappropriate [embedded specific]
>
> # The proper prefix is inside our staging area.
> # Signed-Off: Michael 'Mickey' Lauer<mickey@vanille-media.de>
> +# Signed-off-by: Phil Blundell<philb@gnu.org>
>
> -Index: Python-2.6.6/Lib/distutils/sysconfig.py
> -===================================================================
> ---- Python-2.6.6.orig/Lib/distutils/sysconfig.py
> -+++ Python-2.6.6/Lib/distutils/sysconfig.py
> -@@ -19,8 +19,8 @@ import sys
> +--- Python-2.6.6/Lib/distutils/sysconfig.py.orig 2012-01-03 14:02:03.027005296 +0000
> ++++ Python-2.6.6/Lib/distutils/sysconfig.py 2012-01-03 14:02:31.517601081 +0000
> +@@ -19,8 +19,8 @@
> from distutils.errors import DistutilsPlatformError
>
> # These are needed in a couple of spots, so just compute them once.
> @@ -18,19 +17,16 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
>
> # Path to the base directory of the project. On Windows the binary may
> # live in project/PCBuild9. If we're dealing with an x64 Windows build,
> -@@ -70,7 +70,10 @@ def get_python_inc(plat_specific=0, pref
> +@@ -70,7 +70,7 @@
> sys.exec_prefix -- i.e., ignore 'plat_specific'.
> """
> if prefix is None:
> - prefix = plat_specific and EXEC_PREFIX or PREFIX
> -+ if plat_specific:
> -+ prefix = plat_specific and os.environ['STAGING_INCDIR'].rstrip('include')
> -+ else:
> -+ prefix = plat_specific and EXEC_PREFIX or PREFIX
> ++ prefix = os.environ['STAGING_INCDIR'].rstrip('include')
>
> if os.name == "posix":
> if python_build:
> -@@ -115,12 +118,16 @@ def get_python_lib(plat_specific=0, stan
> +@@ -115,12 +115,16 @@
> If 'prefix' is supplied, use it instead of sys.prefix or
> sys.exec_prefix -- i.e., ignore 'plat_specific'.
> """
> @@ -49,7 +45,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
> if standard_lib:
> return libpython
> else:
> -@@ -216,7 +223,7 @@ def get_config_h_filename():
> +@@ -216,7 +220,7 @@
> else:
> # The name of the config.h file changed in 2.2
> config_h = 'pyconfig.h'
> @@ -58,7 +54,7 @@ Index: Python-2.6.6/Lib/distutils/sysconfig.py
>
>
> def get_makefile_filename():
> -@@ -225,7 +232,7 @@ def get_makefile_filename():
> +@@ -225,7 +229,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)
> diff --git a/meta/recipes-devtools/python/python-native_2.7.2.bb b/meta/recipes-devtools/python/python-native_2.7.2.bb
> index 7d8c597..8bf736d 100644
> --- a/meta/recipes-devtools/python/python-native_2.7.2.bb
> +++ b/meta/recipes-devtools/python/python-native_2.7.2.bb
> @@ -1,6 +1,6 @@
> require python.inc
> DEPENDS = "openssl-native bzip2-full-native zlib-native readline-native sqlite3-native"
> -PR = "${INC_PR}.2"
> +PR = "${INC_PR}.3"
>
> SRC_URI += "file://04-default-is-optimized.patch \
> file://05-enable-ctypes-cross-build.patch \
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-05 20:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04 17:10 [PATCH] python-native: correct prefix handling for oe-core sysroot layout Phil Blundell
2012-01-05 20:24 ` Saul Wold
-- strict thread matches above, loose matches on Subject: below --
2012-01-03 17:39 Phil Blundell
2012-01-03 17:47 ` Martin Jansa
2012-01-03 18:01 ` Phil Blundell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox