From c83057a7dc0418851e89b59d790570aef5fa50f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 21 Sep 2021 14:40:45 +0200 Subject: [PATCH] use new way to find python3 since cmake 3.12 and do not use old python path --- Documentation/doc/CMakeLists.txt | 16 ++++++++-------- Scripts/developer_scripts/run_doxygen_testsuite | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index 1caabcdddcc..e069d2eb4e8 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -27,7 +27,7 @@ else() endif() find_package(Doxygen) -find_package(PythonInterp 3.5) +find_package(Python3 COMPONENTS Interpreter) if(NOT DOXYGEN_FOUND) message(WARNING "Cannot build the documentation without Doxygen!") @@ -322,9 +322,9 @@ endif() set(CGAL_DOC_VERSION ${CGAL_CREATED_VERSION_NUM}) ## generate how_to_cite files -if(PYTHONINTERP_FOUND) +if(Python3_Interpreter_FOUND) execute_process( - COMMAND ${PYTHON_EXECUTABLE} ${CGAL_DOC_SCRIPT_DIR}/generate_how_to_cite.py + COMMAND ${Python3_EXECUTABLE} ${CGAL_DOC_SCRIPT_DIR}/generate_how_to_cite.py ${CGAL_ROOT} ${CMAKE_BINARY_DIR} "${CGAL_BRANCH_BUILD}" RESULT_VARIABLE GENERATE_HOW_TO_CITE_RESULT) if(NOT GENERATE_HOW_TO_CITE_RESULT EQUAL "0") @@ -436,25 +436,25 @@ add_dependencies(Documentation_copy_doc_tags doc_pre) #total level doc dependencies add_dependencies(doc doc_post) -if(PYTHONINTERP_FOUND) +if(Python3_Interpreter_FOUND) set(CGAL_DOC_TESTSUITE_SCRIPT "${CGAL_DOC_SCRIPT_DIR}/testsuite.py") add_custom_target( doc_with_postprocessing - ${PYTHON_EXECUTABLE} ${CGAL_DOC_SCRIPT_DIR}/html_output_post_processing.py + ${Python3_EXECUTABLE} ${CGAL_DOC_SCRIPT_DIR}/html_output_post_processing.py --output ${CGAL_DOC_OUTPUT_DIR} --resources ${CGAL_DOC_RESOURCE_DIR}) add_dependencies(doc_with_postprocessing doc) if(CGAL_DOC_CREATE_LOGS) add_custom_target( Documentation_test - ${PYTHON_EXECUTABLE} ${CGAL_DOC_TESTSUITE_SCRIPT} --output-dir + ${Python3_EXECUTABLE} ${CGAL_DOC_TESTSUITE_SCRIPT} --output-dir ${CGAL_DOC_OUTPUT_DIR} --doc-log-dir ${CGAL_DOC_LOG_DIR}) add_dependencies(Documentation_test doc) add_custom_target( Documentation_test_publish - ${PYTHON_EXECUTABLE} + ${Python3_EXECUTABLE} ${CGAL_DOC_TESTSUITE_SCRIPT} --output-dir ${CGAL_DOC_OUTPUT_DIR} @@ -467,7 +467,7 @@ if(PYTHONINTERP_FOUND) add_custom_target( doc_and_publish_testsuite - ${PYTHON_EXECUTABLE} + ${Python3_EXECUTABLE} ${CGAL_DOC_TESTSUITE_SCRIPT} --output-dir ${CGAL_DOC_OUTPUT_DIR} diff --git a/Scripts/developer_scripts/run_doxygen_testsuite b/Scripts/developer_scripts/run_doxygen_testsuite index 62e1a5d2eeb..a796d4dfde5 100755 --- a/Scripts/developer_scripts/run_doxygen_testsuite +++ b/Scripts/developer_scripts/run_doxygen_testsuite @@ -58,8 +58,6 @@ if [ ! -d "${CGAL_DOC_BUILD}/${CGAL_RELEASE_ID}" ]; then fi cd "${CGAL_RELEASE_ID}" -PYTHONPATH=/home/cgal-testsuite/.local/lib/python2.6/site-packages -export PYTHONPATH PATH=/home/cgal-testsuite/local/bin:$PATH export PATH cd "$PWD/doc/scripts"