From 3b3097802116cca5425962a270161d73aa93a88d Mon Sep 17 00:00:00 2001 From: Samuel Dolt Date: Thu, 20 Oct 2022 13:05:45 +0200 Subject: [PATCH] coreos-doc: use python3-native instead of python3 from the host This fix the recipes by ihneriting the python3native class. DEPENDS was also fix, as we need the native version of the needed package and not the one from the target. It was previously only building because bitbake use by default the host python3 and on my computer I was having all the deps locally installed. --- .../recipes-devtool/core-os/coreos-doc.bb | 17 +++++++++++++++-- scripts/coreos-doc | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/layers/meta-belden-coreos/recipes-devtool/core-os/coreos-doc.bb b/layers/meta-belden-coreos/recipes-devtool/core-os/coreos-doc.bb index 44cb05a..46500e1 100644 --- a/layers/meta-belden-coreos/recipes-devtool/core-os/coreos-doc.bb +++ b/layers/meta-belden-coreos/recipes-devtool/core-os/coreos-doc.bb @@ -3,11 +3,24 @@ SECTION = "devtool" LICENSE = "CLOSED" PV = "0.0.1+git${METADATA_REVISION}" +# The documentation is embedded inside the CoreOS repository structure, so we +# use externsrc to built it inherit externalsrc +EXTERNALSRC := "${COREOS_ROOT}/documentation" + +# This recipe only produce an HTML output, so we need to tell bitbake that it's +# doesn't depends on the target architecture inherit allarch -EXTERNALSRC := "${COREOS_ROOT}/documentation" -DEPENDS += "python3-sphinx python3-sphinx-rtd-theme" +# By default bitbake has the host native python3 in the path, not the one built +# by bitbake, but we can change that by ihneriting python3native +inherit python3native + +# This recipes doesn't need a compiler, so we prevent the base.bbclass to add +# the default set of deps by settings the following variable to 1: +INHIBIT_DEFAULT_DEPS = "1" + +DEPENDS += "python3-sphinx-native python3-sphinx-rtd-theme-native" do_compile() { python3 -m sphinx.cmd.build -b html ${S} ${B} diff --git a/scripts/coreos-doc b/scripts/coreos-doc index 632d701..3f0ac97 100755 --- a/scripts/coreos-doc +++ b/scripts/coreos-doc @@ -1,4 +1,4 @@ #!/usr/bin/env sh -bitbake coreos-doc -xdg-open ${BBPATH}/tmp/deploy/documentation/index.html \ No newline at end of file +bitbake coreos-doc +xdg-open ${BBPATH}/tmp/deploy/documentation/index.html