summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-08-18 09:40:19 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-08-18 09:40:19 +0000
commitef36c8b63bc353ac9d4e6982b9bba6797d546e51 (patch)
treeaeda306bcc15138ba9275c32131604c99475520a
parent5b92662a7ed71546efb4a3697bc0b3e2b315fefc (diff)
Fix sphinx bug when python3 is not in /usr/bin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/persistence_diagram_improvement@2613 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 07f67d4cc1f3b558b191115e0979ce3ce0580206
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake2
-rw-r--r--src/cython/CMakeLists.txt1
-rwxr-xr-xsrc/cython/doc/python3-sphinx-build.in (renamed from src/cython/doc/python3-sphinx-build)2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index e29ba40c..dbf2106a 100644
--- a/src/cmake/modules/GUDHI_third_party_libraries.cmake
+++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake
@@ -123,7 +123,7 @@ if(PYTHONINTERP_FOUND AND CYTHON_FOUND)
find_program( SPHINX_PATH sphinx-build )
elseif(PYTHON_VERSION_MAJOR EQUAL 3)
# No sphinx-build in Pyton3, just hack it
- set(SPHINX_PATH "${CMAKE_SOURCE_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build")
+ set(SPHINX_PATH "${CMAKE_CURRENT_BINARY_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build")
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)
diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt
index a06be008..ab5ea9ef 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -194,6 +194,7 @@ if(CYTHON_FOUND)
endif(UNIX)
# set sphinx-build in make files
+ configure_file(doc/python3-sphinx-build.in "${CMAKE_CURRENT_BINARY_DIR}/doc/python3-sphinx-build" @ONLY)
configure_file(doc/Makefile.in "${CMAKE_CURRENT_BINARY_DIR}/doc/Makefile" @ONLY)
configure_file(doc/make.bat.in "${CMAKE_CURRENT_BINARY_DIR}/doc/make.bat" @ONLY)
diff --git a/src/cython/doc/python3-sphinx-build b/src/cython/doc/python3-sphinx-build.in
index 44b94169..c97965f5 100755
--- a/src/cython/doc/python3-sphinx-build
+++ b/src/cython/doc/python3-sphinx-build.in
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!@PYTHON_EXECUTABLE@
"""
Emulate sphinx-build for python3