From 9c2edfd1aa26458d5ad6aea8c656ef3588b22cd5 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 26 Jul 2020 09:44:37 -0700 Subject: [PATCH] Partially revert 638db5 because it breaks the doc build --- doc/CMakeLists.txt | 3 +-- doc/build.py | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 8e5e8a83..06848450 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -5,11 +5,10 @@ if (NOT DOXYGEN) endif () find_package(PythonInterp QUIET REQUIRED) -find_program(SPHINX_EXECUTABLE NAMES sphinx-build sphinx-build-3) add_custom_target(doc COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build.py - ${SPHINX_EXECUTABLE} ${FMT_VERSION} + ${FMT_VERSION} SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html) include(GNUInstallDirs) diff --git a/doc/build.py b/doc/build.py index 57b0c7ae..6d2d83b4 100755 --- a/doc/build.py +++ b/doc/build.py @@ -59,7 +59,7 @@ def create_build_env(dirname='virtualenv'): '129222318f7c8f865d2631e7da7b033567e7f56a', min_version='4.2.0') -def build_docs(sphinx_executable='sphinx-build', version='dev', **kwargs): +def build_docs(version='dev', **kwargs): doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__))) work_dir = kwargs.get('work_dir', '.') include_dir = kwargs.get( @@ -101,7 +101,7 @@ def build_docs(sphinx_executable='sphinx-build', version='dev', **kwargs): raise CalledProcessError(p.returncode, cmd) html_dir = os.path.join(work_dir, 'html') main_versions = reversed(versions[-3:]) - check_call([sphinx_executable, + check_call(['sphinx-build', '-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir), '-Dversion=' + version, '-Drelease=' + version, '-Aversion=' + version, '-Aversions=' + ','.join(main_versions), @@ -121,4 +121,4 @@ def build_docs(sphinx_executable='sphinx-build', version='dev', **kwargs): if __name__ == '__main__': create_build_env() - build_docs(sys.argv[1], sys.argv[2]) + build_docs(sys.argv[1])