[PATCH v2 3/7] doc: make pdfdocs: Add pip install -r test/py/requirements.txt to the list of needed steps
    Heinrich Schuchardt 
    xypron.glpk at gmx.de
       
    Fri Oct 17 15:50:44 CEST 2025
    
    
  
On 10/6/25 00:10, Adriano Carvalho wrote:
> As requested, I added this step to all doc targets.
This change looks wrong to me.
Everything needed to build the documentation should be in 
doc/sphinx/requirements.txt.
Everything needed to run tests should be in test/py/requirements.txt.
If there is an overlap that is fine. But, please, abstain from confusing 
the two.
Please, add missing dependencies to doc/sphinx/requirements.txt.
> 
> If I don't do this, this is what I get with
> docker.io/trini/u-boot-gitlab-ci-runner:jammy-20250714-25Jul2025:
> 
> uboot at 35c89b9ab70e:~/u-boot$ make pdfdocs
> [...]
> WARNING: autodoc: failed to import module 'test_bind'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
Why should pytest be needed to build documentation?
Something must be really wrong in the pdfdocs make target if this error 
comes up.
Best regards
Heinrich
> WARNING: autodoc: failed to import module 'test_bootmenu'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
> WARNING: autodoc: failed to import module 'test_bootstage'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
> WARNING: autodoc: failed to import module 'test_button'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
> WARNING: autodoc: failed to import module 'test_efi_loader'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
> WARNING: autodoc: failed to import module 'test_net'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
> WARNING: autodoc: failed to import module 'test_net_boot'; the following exception was raised:
> No module named 'pytest' [autodoc.import_object]
> [...]
> build finished with problems, 7 warnings (with warnings treated as errors).
> make[1]: *** [doc/Makefile:84: latexdocs] Error 1
> make: *** [Makefile:2687: pdfdocs] Error 2
> 
> NOTE: This won't completely fix the pdfdocs target. See next commit(s).
> 
> Signed-off-by: Adriano Carvalho <adrianocarvalho.pt at gmail.com>
> ---
>   doc/build/documentation.rst | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/doc/build/documentation.rst b/doc/build/documentation.rst
> index f977781184d..483bdc42227 100644
> --- a/doc/build/documentation.rst
> +++ b/doc/build/documentation.rst
> @@ -35,6 +35,7 @@ The *htmldocs* target is used to build the HTML documentation. It uses the
>       . myenv/bin/activate
>       # Install build requirements
>       python3 -m pip install -r doc/sphinx/requirements.txt
> +    python3 -m pip install -r test/py/requirements.txt
>       # Build the documentation
>       make htmldocs
>       # Deactivate the Python environment
> @@ -58,6 +59,7 @@ The *infodocs* target builds both a texinfo and an info file:
>       . myenv/bin/activate
>       # Install build requirements
>       python3 -m pip install -r doc/sphinx/requirements.txt
> +    python3 -m pip install -r test/py/requirements.txt
>       # Build the documentation
>       make infodocs
>       # Deactivate the Python environment
> @@ -78,6 +80,7 @@ The *pdfdocs* target is meant to be used to build PDF documentation:
>       . myenv/bin/activate
>       # Install build requirements
>       python3 -m pip install -r doc/sphinx/requirements.txt
> +    python3 -m pip install -r test/py/requirements.txt
>       # Build the documentation
>       make pdfdocs
>       # Deactivate the Python environment
> @@ -95,6 +98,7 @@ We can use texi2pdf instead:
>       . myenv/bin/activate
>       # Install build requirements
>       python3 -m pip install -r doc/sphinx/requirements.txt
> +    python3 -m pip install -r test/py/requirements.txt
>       # Build the documentation
>       make texinfodocs
>       # Deactivate the Python environment
> @@ -115,6 +119,7 @@ To build only the texinfo documentation the *texinfodocs* target is used:
>       . myenv/bin/activate
>       # Install build requirements
>       python3 -m pip install -r doc/sphinx/requirements.txt
> +    python3 -m pip install -r test/py/requirements.txt
>       # Build the documentation
>       make texinfodocs
>       # Deactivate the Python environment
    
    
More information about the U-Boot
mailing list