Skip to contentSkip to conversation

python3: set PYTHONHOME for nativesdk

PATCH In review [email protected] 2 participants 4 messages Oct 11, 2018 – Oct 12, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3: set PYTHONHOME for nativesdk

From: Cheuk Wing Leung <[email protected]>

commit c5629268b0f8ae0a425c98337d13e8dc83107e13:
[
python: set PYTHONHOME for nativesdk

This ensures that the nativesdk python functions correctly without needing to set PYTHONHOME in the sdk environment setup script.
]

it's also needed for python3.

---
 meta/recipes-devtools/python/python3_3.5.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3_3.5.6.bb +1 -1
index e179658..c481aad 100644
@@ -179,7 +179,7 @@ do_install() {
 }
 
 do_install_append_class-nativesdk () {
-	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
+	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
 }
 
 SSTATE_SCAN_FILES += "Makefile"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 11 lines · On Thu, 2018-10-11 at 16:15 +0200, [email protected] wrote:

From: Cheuk Wing Leung <[email protected]>

commit c5629268b0f8ae0a425c98337d13e8dc83107e13:
[
python: set PYTHONHOME for nativesdk

This ensures that the nativesdk python functions correctly
without needing to
set PYTHONHOME in the sdk environment setup script.
]

Quoted 7 lines

it's also needed for python3.

---
 meta/recipes-devtools/python/python3_3.5.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I think its this which is causing breakage:

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step3b

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step2b

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step1b

Cheers,

Richard

author
#2 lore raw
In reply to [email protected]

Hi, Richard:

Quoted 3 lines

I think its this which is causing breakage:

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step3b

Quoted 2 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step2b

Quoted 2 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step1b

Are you sure about this? This patch creates a nativesdk python3 wrapper which supposes to run on SDK machine, it should not impact native sysroot binaries, and I could not reproduce the error with the patch applied on my local machine. (Ubuntu-16.04)

//Ming Liu

<[email protected]> 於 2018年10月11日 週四 下午4:16寫道:

Quoted 42 lines

From: Cheuk Wing Leung <[email protected]>

commit c5629268b0f8ae0a425c98337d13e8dc83107e13:
[
python: set PYTHONHOME for nativesdk

This ensures that the nativesdk python functions correctly without
needing to
set PYTHONHOME in the sdk environment setup script.
]

it's also needed for python3.

---
 meta/recipes-devtools/python/python3_3.5.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/python/python3_3.5.6.bb +0 -1
index e179658..c481aad 100644
@@ -179,7 +179,7 @@ do_install() {
 }
 
 do_install_append_class-nativesdk () {
-       create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN}

TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
+ create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN}
PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' PYTHONNOUSERSITE='1'
}

SSTATE_SCAN_FILES += "Makefile"
--
2.7.4

#3 lore raw
Quoted 11 lines · Ming Liu

Hi, Richard:

Quoted 3 lines

I think its this which is causing breakage:

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step3b

Quoted 2 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step2b

Quoted 2 lines
Quoted 6 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/20/builds/106/steps/7/logs/step1b

Are you sure about this? This patch creates a nativesdk python3 wrapper which supposes to run on SDK machine, it should not impact native sysroot binaries, and I could not reproduce the error with the patch applied on my local machine. (Ubuntu-16.04)

Sorry for the false alarm, its actually the cmake patches sine after dropping those, -next built cleanly. Cc'ing Pascal Bach...

Cheers,

Richard