Use inherit_defer to only inherit python3native (thus, a dependency on
python3-native) when gtk-doc is actually enabled.

This is useful in native builds where gtk-doc is disabled and so will no
longer depend on python3-native.

Signed-off-by: Ross Burton <[email protected]>
---
 meta/classes-recipe/gtk-doc.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/gtk-doc.bbclass 
b/meta/classes-recipe/gtk-doc.bbclass
index 9d3911966bb..33f6617e1bd 100644
--- a/meta/classes-recipe/gtk-doc.bbclass
+++ b/meta/classes-recipe/gtk-doc.bbclass
@@ -35,9 +35,11 @@ DEPENDS:append = " gtk-doc-native"
 
 export STAGING_DIR_HOST
 
-inherit python3native pkgconfig qemu
+inherit pkgconfig qemu
 DEPENDS:append = "${@' qemu-native' if d.getVar('GTKDOC_ENABLED') == 'True' 
else ''}"
 
+inherit_defer ${@bb.utils.contains('GTKDOC_ENABLED', 'True', 'python3native', 
'', d)}
+
 do_compile:prepend:class-target () {
     if [ ${GTKDOC_ENABLED} = True ]; then
         # Write out a qemu wrapper that will be given to gtkdoc-scangobj so 
that it
-- 
2.43.0

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

Reply via email to