Hi,

On Tue Dec 2, 2025 at 7:05 PM CET, Quentin Schulz wrote:
> From: Quentin Schulz <[email protected]>
>
> This will be a dependency for building the Yocto docs soon, so let's add
> a recipe for it.
>
> This does SVG to PDF (or PNG) conversion for images used in Sphinx
> projects.
>
> It exposes three different Sphinx extensions, each using a different
> tool for the conversion:
> - cairosvg, a Python module with no available recipe,
> - inkscape, only available in seemingly unmaintained 3rd party layer,
> - rsvg-convert,
>
> So we'll only support the last extension for now.
>
> Signed-off-by: Quentin Schulz <[email protected]>
> ---
>  .../python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb  | 20 
> ++++++++++++++++++++
>  scripts/lib/recipetool/create_buildsys_python.py     |  8 ++++++--
>  2 files changed, 26 insertions(+), 2 deletions(-)
>
> diff --git 
> a/meta/recipes-devtools/python/python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb
>  
> b/meta/recipes-devtools/python/python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb
> new file mode 100644
> index 0000000000..c686ebff23
> --- /dev/null
> +++ 
> b/meta/recipes-devtools/python/python3-sphinxcontrib-svg2pdfconverter_2.0.0.bb
> @@ -0,0 +1,20 @@
> +SUMMARY = "Sphinx SVG to PDF or PNG converter extension"
> +HOMEPAGE = 
> "https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter";
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b11cf936853a71258d4b57bb1849a3f9"
> +
> +SRC_URI[sha256sum] = 
> "ab9c8f1080391e231812d20abf2657a69ee35574563b1014414f953964a95fa3"
> +
> +inherit pypi python_setuptools_build_meta
> +
> +PYPI_PACKAGE = "sphinxcontrib_svg2pdfconverter"
> +UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
> +
> +RDEPENDS:${PN} = "python3-sphinx"
> +# Only support sphinxcontrib.rsvgconverter for now.
> +# As cairosvgconverter depends on cairosvg module, no recipe available yet
> +# As inkscapeconverter depends on inkscape, recipe in meta-office, 3rd-party
> +# layer not updated in years
> +RDEPENDS:${PN} += "librsvg"
> +
> +BBCLASSEXTEND = "native nativesdk"

Patchtest should have seen this, but you need to add an entry for the recipe in
meta/conf/distro/include/maintainers.inc. I can assign myself otherwise as I
maintain some of the other docs related recipes.

> diff --git a/scripts/lib/recipetool/create_buildsys_python.py 
> b/scripts/lib/recipetool/create_buildsys_python.py
> index a807dafae5..c6a40f5a7d 100644
> --- a/scripts/lib/recipetool/create_buildsys_python.py
> +++ b/scripts/lib/recipetool/create_buildsys_python.py
> @@ -858,10 +858,14 @@ class 
> PythonPyprojectTomlRecipeHandler(PythonRecipeHandler):
>              if metadata:
>                  for field, values in metadata.items():
>                      if field == "license":
> -                        # For setuptools.build_meta and flit, licence is a 
> table
> +                        # For flit, licence is a table
> +                        # For setuptools.build_meta, license can be:
> +                        #  - an SPDX license expression as string, since 
> PEP-0639,
> +                        #  - a table, pre-PEP-0639,
>                          # but for poetry licence is a string
>                          # for hatchling, both table (jsonschema) and string 
> (iniconfig) have been used
> -                        if build_backend == "poetry.core.masonry.api":
> +                        if build_backend == "poetry.core.masonry.api" or \
> +                                (build_backend == "setuptools.build_meta" 
> and type(values) == str):

Should this be sent in a separate patch? It looks like it's fixing a bug in
recipetool, there's no explanation about it in your commit message.

Otherwise, I was able to build the tarball and test building the docs with it
(and your other docs patch)!

Thanks,
Antonin

-- 
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

Reply via email to