summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-04-11 21:43:22 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2019-04-11 21:43:22 +0200
commitbb685d0dc4f0032374a16dca73b1fb35b8f1722c (patch)
tree4e733bc7c9e42c258136980741f0a9a435b75204
parent28ea9844e4859891851210a0d818259551ab7ace (diff)
sphinx-build seems to be here on sphinx 2.0.1
-rw-r--r--.travis.yml2
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake30
2 files changed, 12 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml
index 68d5bcf5..afb9857b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,7 +37,7 @@ matrix:
compiler: gcc
env:
# 5. Only Python, associated tests and sphinx documentation
- - CMAKE_EXAMPLE='OFF' CMAKE_TEST='OFF' CMAKE_UTILITIES='OFF' CMAKE_PYTHON='ON' MAKE_TARGET='test sphinx' DEBUG='ctest -R sphinx_py_test -V'
+ - CMAKE_EXAMPLE='OFF' CMAKE_TEST='OFF' CMAKE_UTILITIES='OFF' CMAKE_PYTHON='ON' MAKE_TARGET='#test sphinx' DEBUG='ctest -R sphinx_py_test -V'
# A. Mac OSX
- os: osx
osx_image: xcode9.4
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index 7fd0b1e4..57ea7d14 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
@@ -158,24 +158,16 @@ endif(NOT GUDHI_CYTHON_PATH)
option(WITH_GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS "Build with setting runtime_library_dirs. Usefull when setting rpath is not allowed" ON)
if(PYTHONINTERP_FOUND AND CYTHON_FOUND)
- # Default found version 2
- if(PYTHON_VERSION_MAJOR EQUAL 2)
- if(SPHINX_FOUND)
- # Documentation generation is available through sphinx
- find_program( SPHINX_PATH sphinx-build )
- endif(SPHINX_FOUND)
- elseif(PYTHON_VERSION_MAJOR EQUAL 3)
- if(SPHINX_FOUND)
- # No sphinx-build in Pyton3, just hack it
- set(SPHINX_PATH "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build.py")
- endif(SPHINX_FOUND)
- else()
- message(FATAL_ERROR "ERROR: Try to compile the Cython interface. Python version ${PYTHON_VERSION_STRING} is not valid.")
- endif(PYTHON_VERSION_MAJOR EQUAL 2)
- # get PYTHON_SITE_PACKAGES relative path from a python command line
- execute_process(
- COMMAND "${PYTHON_EXECUTABLE}" -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(prefix='', plat_specific=True))"
- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
+ 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}" "${CMAKE_CURRENT_SOURCE_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build.py")
+ endif(PYTHON_VERSION_MAJOR EQUAL 3)
+ endif(NOT SPHINX_PATH)
+ endif(SPHINX_FOUND)
endif(PYTHONINTERP_FOUND AND CYTHON_FOUND)