From 38f355d87b98a734ec8f5677ec01cc64d9faf89d Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 28 Oct 2018 09:26:21 -0700 Subject: [PATCH] Revert "find sphinx-build before calling build.py" This reverts commit 07200f445a64c73c153ec8835f4c1460d2bca377 because the latter doesn't work with virtualenv correctly. --- doc/CMakeLists.txt | 7 +------ doc/build.py | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 87ad9ecf..c16427a9 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -4,13 +4,8 @@ if (NOT DOXYGEN) return () endif () -find_package(PythonInterp - QUIET REQUIRED) -find_program(SPHINX_EXECUTABLE - NAMES sphinx-build sphinx-build-3) add_custom_target(doc - COMMAND ${CMAKE_COMMAND} -E env SPHINX_EXECUTABLE=${SPHINX_EXECUTABLE} - ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION} + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION} SOURCES api.rst syntax.rst build.py conf.py _templates/layout.html) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ diff --git a/doc/build.py b/doc/build.py index 317d0305..e44ad7c3 100755 --- a/doc/build.py +++ b/doc/build.py @@ -100,8 +100,7 @@ def build_docs(version='dev', **kwargs): raise CalledProcessError(p.returncode, cmd) html_dir = os.path.join(work_dir, 'html') main_versions = reversed(versions[-3:]) - sphinx_build = os.environ.get('SPHINX_EXECUTABLE', 'sphinx-build') - check_call([sphinx_build, + check_call(['sphinx-build', '-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir), '-Dversion=' + version, '-Drelease=' + version, '-Aversion=' + version, '-Aversions=' + ','.join(main_versions),