Skip to content
  • Peter Maydell's avatar
    758b617a
    configure: Check that sphinx-build is using Python 3 · 758b617a
    Peter Maydell authored
    
    
    Currently configure's has_sphinx_build() check simply runs a dummy
    sphinx-build and either passes or fails.  This means that "no
    sphinx-build at all" and "sphinx-build exists but is too old" are
    both reported the same way.
    
    Further, we want to assume that all the Python we write is running
    with at least Python 3.5; configure checks that for our scripts, but
    Sphinx extensions run with whatever Python version sphinx-build
    itself is using.
    
    Add a check to our conf.py which makes sphinx-build fail if it would
    be running our extensions with an old Python, and handle this
    in configure so we can report failure helpfully to the user.
    This will mean that configure --enable-docs will fail like this
    if the sphinx-build provided is not suitable:
    
    Warning: sphinx-build exists but it is either too old or uses too old a Python version
    
    ERROR: User requested feature docs
           configure was not able to find it.
           Install texinfo, Perl/perl-podlators and a Python 3 version of python-sphinx
    
    (As usual, the default is to simply not build the docs, as we would
    if sphinx-build wasn't present at all.)
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    Reviewed-by: default avatarWainer dos Santos Moschetta <wainersm@redhat.com>
    Message-Id: <20200213175647.17628-3-peter.maydell@linaro.org>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    758b617a
    configure: Check that sphinx-build is using Python 3
    Peter Maydell authored
    
    
    Currently configure's has_sphinx_build() check simply runs a dummy
    sphinx-build and either passes or fails.  This means that "no
    sphinx-build at all" and "sphinx-build exists but is too old" are
    both reported the same way.
    
    Further, we want to assume that all the Python we write is running
    with at least Python 3.5; configure checks that for our scripts, but
    Sphinx extensions run with whatever Python version sphinx-build
    itself is using.
    
    Add a check to our conf.py which makes sphinx-build fail if it would
    be running our extensions with an old Python, and handle this
    in configure so we can report failure helpfully to the user.
    This will mean that configure --enable-docs will fail like this
    if the sphinx-build provided is not suitable:
    
    Warning: sphinx-build exists but it is either too old or uses too old a Python version
    
    ERROR: User requested feature docs
           configure was not able to find it.
           Install texinfo, Perl/perl-podlators and a Python 3 version of python-sphinx
    
    (As usual, the default is to simply not build the docs, as we would
    if sphinx-build wasn't present at all.)
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
    Reviewed-by: default avatarWainer dos Santos Moschetta <wainersm@redhat.com>
    Message-Id: <20200213175647.17628-3-peter.maydell@linaro.org>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Loading