poky/meta/classes-recipe/python3targetconfig.bbclass
Johannes Schrimpf 94571aa1b7 python3targetconfig.bbclass: Extend PYTHONPATH instead of overwriting
[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.

Fixes: c9617c03bcee ("python3targetconfig.bbclass: use PYTHONPATH to point to the target config")
(From OE-Core rev: 2442ab92f8610784d28d8d83056b643bd95b0b4e)

Signed-off-by: Johannes Schrimpf <dev@loewen-email.de>
[Luca: add Fixes: tag]
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-05-05 11:07:25 +01:00

42 lines
867 B
Plaintext

#
# Copyright OpenEmbedded Contributors
#
# SPDX-License-Identifier: MIT
#
inherit python3native
EXTRA_PYTHON_DEPENDS ?= ""
EXTRA_PYTHON_DEPENDS:class-target = "python3"
DEPENDS:append = " ${EXTRA_PYTHON_DEPENDS}"
setup_target_config() {
export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
export PYTHONPATH=${STAGING_LIBDIR}/python-sysconfigdata:$PYTHONPATH
export PATH=${STAGING_EXECPREFIXDIR}/python-target-config/:$PATH
}
do_configure:prepend:class-target() {
setup_target_config
}
do_compile:prepend:class-target() {
setup_target_config
}
do_install:prepend:class-target() {
setup_target_config
}
do_configure:prepend:class-nativesdk() {
setup_target_config
}
do_compile:prepend:class-nativesdk() {
setup_target_config
}
do_install:prepend:class-nativesdk() {
setup_target_config
}