Bug#792715: opencv: FTBFS with Sphinx 1.3: wrong code to detect Sphinx version

Dmitry Shachnev mitya57 at debian.org
Fri Jul 17 17:46:53 UTC 2015


Source: opencv
Version: 2.4.9.1+dfsg-1.1
User: python-modules-team at lists.alioth.debian.org
Usertags: sphinx1.3

opencv FTBFS with Sphinx 1.3 (which is available in experimental),
because cmake cannot detect Sphinx properly. This can be seen in
cmake output:

  --   Documentation:
  --     Build Documentation:         NO
  --     Sphinx:                      NO
  --     PdfLaTeX compiler:           /usr/bin/pdflatex

The relevant code in cmake/OpenCVDetectPython.cmake is:

    find_host_program(SPHINX_BUILD sphinx-build)
    if(SPHINX_BUILD)
        execute_process(COMMAND "${SPHINX_BUILD}"
                        OUTPUT_QUIET
                        ERROR_VARIABLE SPHINX_OUTPUT
                        OUTPUT_STRIP_TRAILING_WHITESPACE)
        if(SPHINX_OUTPUT MATCHES "Sphinx v([0-9][^ \n]*)")
          set(SPHINX_VERSION "${CMAKE_MATCH_1}")
          set(HAVE_SPHINX 1)
          message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}")
        endif()
    endif()

Here it calls 'sphinx-build' and expects the output to be
"Sphinx v([0-9][^ \n]*)".

However with Sphinx 1.3, 'sphinx-build' prints:

  $ sphinx-build
  Error: Insufficient arguments.

You need to pass --version and adjust the regex a bit:

  $ sphinx-build --version
  Sphinx (sphinx-build) 1.3.1

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20150717/3e6a3d68/attachment.sig>


More information about the debian-science-maintainers mailing list