Patchwork python-native: export some environment variables

login
register
mail settings
Submitter Chong.Lu@windriver.com
Date Feb. 22, 2014, 5:54 a.m.
Message ID <1393048477-16896-1-git-send-email-Chong.Lu@windriver.com>
Download mbox | patch
Permalink /patch/67145/
State New
Headers show

Comments

Chong.Lu@windriver.com - Feb. 22, 2014, 5:54 a.m.
Need to export these environment variables for python-config to work.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta/classes/pythonnative.bbclass |    4 ++++
 1 file changed, 4 insertions(+)
Saul Wold - Feb. 24, 2014, 2:18 p.m.
On 02/22/2014 07:54 AM, Chong Lu wrote:
> Need to export these environment variables for python-config to work.
>
Can you clariy further as to what's broken?  Has this not been working 
in the past, or is this a new test of somekine that we are failing?

Sau!

> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> ---
>   meta/classes/pythonnative.bbclass |    4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
> index fdd22bb..58a5b5c 100644
> --- a/meta/classes/pythonnative.bbclass
> +++ b/meta/classes/pythonnative.bbclass
> @@ -4,3 +4,7 @@ inherit python-dir
>   PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
>   EXTRANATIVEPATH += "${PYTHON_PN}-native"
>   DEPENDS += " ${PYTHON_PN}-native "
> +export STAGING_INCDIR
> +export STAGING_LIBDIR
> +export BUILD_SYS
> +export HOST_SYS
>
Chong.Lu@windriver.com - Feb. 25, 2014, 2:50 a.m.
On 02/24/2014 10:18 PM, Saul Wold wrote:
> On 02/22/2014 07:54 AM, Chong Lu wrote:
>> Need to export these environment variables for python-config to work.
>>
> Can you clariy further as to what's broken?  Has this not been working 
> in the past, or is this a new test of somekine that we are failing?
>
> Sau!
>


checking for python script directory... Traceback (most recent call last):
   File "<string>", line 22, in <module>
   File 
"/yocto/build/qemux86-64/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", 
line 22, in <module>
     PREFIX = os.path.normpath(sys.prefix).replace( 
os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
TypeError: expected a character buffer object
${libdir}/python2.7/site-packages
checking for python extension module directory... Traceback (most recent 
call last):
   File "<string>", line 22, in <module>
   File 
"/yocto/build/qemux86-64/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", 
line 22, in <module>
     PREFIX = os.path.normpath(sys.prefix).replace( 
os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
TypeError: expected a character buffer object

Above error comes from some packages' do_configure log.
This error doesn't block building.
Some packages export above env variables in bb file, but someone not.
So I think these env variables should be exported in bbclass file.

Best Regards
Chong


>> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>> ---
>>   meta/classes/pythonnative.bbclass |    4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/meta/classes/pythonnative.bbclass 
>> b/meta/classes/pythonnative.bbclass
>> index fdd22bb..58a5b5c 100644
>> --- a/meta/classes/pythonnative.bbclass
>> +++ b/meta/classes/pythonnative.bbclass
>> @@ -4,3 +4,7 @@ inherit python-dir
>> PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
>>   EXTRANATIVEPATH += "${PYTHON_PN}-native"
>>   DEPENDS += " ${PYTHON_PN}-native "
>> +export STAGING_INCDIR
>> +export STAGING_LIBDIR
>> +export BUILD_SYS
>> +export HOST_SYS
>>
>
>
Chong.Lu@windriver.com - March 24, 2014, 6:45 a.m.
ping

On 02/25/2014 10:50 AM, Lu Chong wrote:
>
> On 02/24/2014 10:18 PM, Saul Wold wrote:
>> On 02/22/2014 07:54 AM, Chong Lu wrote:
>>> Need to export these environment variables for python-config to work.
>>>
>> Can you clariy further as to what's broken?  Has this not been 
>> working in the past, or is this a new test of somekine that we are 
>> failing?
>>
>> Sau!
>>
>
>
> checking for python script directory... Traceback (most recent call 
> last):
>   File "<string>", line 22, in <module>
>   File 
> "/yocto/build/qemux86-64/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", 
> line 22, in <module>
>     PREFIX = os.path.normpath(sys.prefix).replace( 
> os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
> TypeError: expected a character buffer object
> ${libdir}/python2.7/site-packages
> checking for python extension module directory... Traceback (most 
> recent call last):
>   File "<string>", line 22, in <module>
>   File 
> "/yocto/build/qemux86-64/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", 
> line 22, in <module>
>     PREFIX = os.path.normpath(sys.prefix).replace( 
> os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
> TypeError: expected a character buffer object
>
> Above error comes from some packages' do_configure log.
> This error doesn't block building.
> Some packages export above env variables in bb file, but someone not.
> So I think these env variables should be exported in bbclass file.
>
> Best Regards
> Chong
>
>
>>> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>>> ---
>>>   meta/classes/pythonnative.bbclass |    4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/meta/classes/pythonnative.bbclass 
>>> b/meta/classes/pythonnative.bbclass
>>> index fdd22bb..58a5b5c 100644
>>> --- a/meta/classes/pythonnative.bbclass
>>> +++ b/meta/classes/pythonnative.bbclass
>>> @@ -4,3 +4,7 @@ inherit python-dir
>>> PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
>>>   EXTRANATIVEPATH += "${PYTHON_PN}-native"
>>>   DEPENDS += " ${PYTHON_PN}-native "
>>> +export STAGING_INCDIR
>>> +export STAGING_LIBDIR
>>> +export BUILD_SYS
>>> +export HOST_SYS
>>>
>>
>>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>

Patch

diff --git a/meta/classes/pythonnative.bbclass b/meta/classes/pythonnative.bbclass
index fdd22bb..58a5b5c 100644
--- a/meta/classes/pythonnative.bbclass
+++ b/meta/classes/pythonnative.bbclass
@@ -4,3 +4,7 @@  inherit python-dir
 PYTHON="${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}"
 EXTRANATIVEPATH += "${PYTHON_PN}-native"
 DEPENDS += " ${PYTHON_PN}-native "
+export STAGING_INCDIR
+export STAGING_LIBDIR
+export BUILD_SYS
+export HOST_SYS