summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-09-12 21:47:19 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-09-12 21:47:19 +0000
commit8a22b7c6111b41e91766cdd53c0116b845e068b5 (patch)
treefcaa26408004578abd245c0335a4c9153b584ec0 /src
parent9a3df180af4976242fb45d7dcd49c3632e65f04c (diff)
Fix sphinx build for python3 on Ubuntu
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cythonization_improvement@2667 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c720b8be2919344e06f3d71cefdd7693439f63f0
Diffstat (limited to 'src')
-rw-r--r--src/cmake/modules/GUDHI_third_party_libraries.cmake2
-rw-r--r--src/cython/CMakeLists.txt9
-rwxr-xr-xsrc/cython/doc/python3-sphinx-build.py (renamed from src/cython/doc/python3-sphinx-build.in)2
3 files changed, 5 insertions, 8 deletions
diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake
index dbf2106a..f2bbafdc 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_CURRENT_BINARY_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build")
+ set(SPHINX_PATH "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/${GUDHI_CYTHON_PATH}/doc/python3-sphinx-build.py")
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 baeeb203..d1761f47 100644
--- a/src/cython/CMakeLists.txt
+++ b/src/cython/CMakeLists.txt
@@ -75,7 +75,7 @@ if(CYTHON_FOUND)
if (NOT CGAL_VERSION VERSION_LESS 4.8.1)
set(GUDHI_CYTHON_BOTTLENECK_DISTANCE "include '${CMAKE_CURRENT_SOURCE_DIR}/cython/bottleneck_distance.pyx'")
- endif (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
+ endif (NOT CGAL_VERSION VERSION_LESS 4.8.1)
if (NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
set(GUDHI_CYTHON_SUBSAMPLING "include '${CMAKE_CURRENT_SOURCE_DIR}/cython/subsampling.pyx'")
set(GUDHI_CYTHON_TANGENTIAL_COMPLEX "include '${CMAKE_CURRENT_SOURCE_DIR}/cython/tangential_complex.pyx'")
@@ -300,20 +300,17 @@ if(CYTHON_FOUND)
# Documentation generation is available through sphinx - requires all modules
if(SPHINX_PATH AND NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
- # set sphinx-build in make files
- configure_file(doc/python3-sphinx-build.in "${CMAKE_CURRENT_BINARY_DIR}/doc/python3-sphinx-build" @ONLY)
-
# sphinx target requires gudhi.so, because conf.py reads gudhi version from it
add_custom_target(sphinx
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
- ${SPHINX_PATH} -b html . "${CMAKE_CURRENT_BINARY_DIR}/sphinx"
+ ${SPHINX_PATH} -b html ${CMAKE_CURRENT_SOURCE_DIR}/doc sphinx
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/gudhi.so")
add_test(NAME sphinx_py_test
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}"
- ${SPHINX_PATH} -b doctest ${CMAKE_CURRENT_SOURCE_DIR}/doc "${CMAKE_CURRENT_BINARY_DIR}/sphinx")
+ ${SPHINX_PATH} -b doctest ${CMAKE_CURRENT_SOURCE_DIR}/doc doctest)
endif(SPHINX_PATH AND NOT CGAL_WITH_EIGEN3_VERSION VERSION_LESS 4.8.1)
endif(CYTHON_FOUND)
diff --git a/src/cython/doc/python3-sphinx-build.in b/src/cython/doc/python3-sphinx-build.py
index c97965f5..44b94169 100755
--- a/src/cython/doc/python3-sphinx-build.in
+++ b/src/cython/doc/python3-sphinx-build.py
@@ -1,4 +1,4 @@
-#!@PYTHON_EXECUTABLE@
+#!/usr/bin/python3
"""
Emulate sphinx-build for python3