Skip to content

Commit

Permalink
Merge pull request #805 from mglisse/sphinx-python-version
Browse files Browse the repository at this point in the history
Always specify python executable for sphinx
  • Loading branch information
VincentRouvreau authored Jan 30, 2023
2 parents 2fc66ab + 2fb292c commit 03ef585
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/cmake/modules/GUDHI_third_party_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,9 @@ if (WITH_GUDHI_PYTHON)
if(PYTHONINTERP_FOUND AND CYTHON_FOUND)
if(SPHINX_FOUND)
# Documentation generation is available through sphinx
find_program( SPHINX_PATH sphinx-build )

if(NOT SPHINX_PATH)
if(PYTHON_VERSION_MAJOR EQUAL 3)
# In Python3, just hack sphinx-build if it does not exist
set(SPHINX_PATH "${PYTHON_EXECUTABLE}" "-m" "sphinx.cmd.build")
endif(PYTHON_VERSION_MAJOR EQUAL 3)
endif(NOT SPHINX_PATH)
#find_program( SPHINX_PATH sphinx-build )
# Calling sphinx-build may use a different version of python and fail
set(SPHINX_PATH "${PYTHON_EXECUTABLE}" "-m" "sphinx.cmd.build")
endif(SPHINX_FOUND)
endif(PYTHONINTERP_FOUND AND CYTHON_FOUND)
endif (WITH_GUDHI_PYTHON)

0 comments on commit 03ef585

Please sign in to comment.