Skip to contentSkip to conversation

python3targetconfig.bbclass: Extend PYTHONPATH instead of overwriting

PATCH In review [email protected] 3 participants 3 messages Apr 25, 2023 – Apr 26, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3targetconfig.bbclass: Extend PYTHONPATH instead of overwriting

From: Johannes Schrimpf <[email protected]>

[YOCTO #15108] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15108

Since the latest change, the PYTHONPATH is overwritten instead of extended. This leads to changed behavior and build errors of recipes where the PYTHONPATH is set before setup_target_config is run.

---
 meta/classes-recipe/python3targetconfig.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/python3targetconfig.bbclass +1 -1
index 22305fe176..08bc619398 100644
@@ -12,7 +12,7 @@ DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}"
 
 setup_target_config() {
         export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
-        export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata
+        export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata:$PYTHONPATH
         export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH
 }
 
Signature · 1 line
2.37.1 (Apple Git-137.1)
#1 lore raw
Quoted 5 lines · On Tue, Apr 25, 2023 at 2:15 AM <[email protected]> wrote:

From: Johannes Schrimpf <[email protected]>

[YOCTO #15108] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15108

Since the latest change,

We should mention the commit where the change was made:
https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/python3targetconfig.bbclass?id=c9617c03bceee54dc540318cada392799b137bd5

the PYTHONPATH is overwritten instead of extended.

Quoted 39 lines

This leads to changed behavior and build errors of recipes where the PYTHONPATH
is set before setup_target_config is run.

---
 meta/classes-recipe/python3targetconfig.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/python3targetconfig.bbclass +1 -1
index 22305fe176..08bc619398 100644
@@ -12,7 +12,7 @@ DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}"
 
 setup_target_config() {
         export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
-        export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata
+        export

PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata:$PYTHONPATH

         export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH

}

--
2.37.1 (Apple Git-137.1)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#180375):
https://lists.openembedded.org/g/openembedded-core/message/180375
Mute This Topic: https://lists.openembedded.org/mt/98489203/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Tim, Johannes,

Quoted 11 lines · On Tue, 25 Apr 2023 07:25:58 -0700 "Tim Orling" <[email protected]> wrote:
Quoted 5 lines · On Tue, Apr 25, 2023 at 2:15 AM <[email protected]> wrote:

From: Johannes Schrimpf <[email protected]>

[YOCTO #15108] -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=15108

Since the latest change,

We should mention the commit where the change was made:
https://git.openembedded.org/openembedded-core/commit/meta/classes-recipe/python3targetconfig.bbclass?id=c9617c03bceee54dc540318cada392799b137bd5

Good idea. I'm taking this patch for testing and adding a 'Fixes' tag. No need to resend.

Best regards,
Luca

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com