cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/846?usp=email )
Change subject: Ensure that Python3 is available ...................................................................... Ensure that Python3 is available Use the more standard cmake find_package to search for Python3 and make it required. This also provides a better error message than "version.cmake" not found when python3 is missing. Change-Id: I350fd615ed8474d34392a057a5f8bded78173949 Signed-off-by: Arne Schwabe <[email protected]> Acked-by: Lev Stipakov <[email protected]> Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg30232.html Signed-off-by: Gert Doering <[email protected]> --- M CMakeLists.txt 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b5b7ff..9ffcc89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,9 +107,9 @@ endif () endif () -find_program(PYTHON NAMES python3 python) +find_package(Python3 REQUIRED COMPONENTS Interpreter) execute_process( - COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/parse-version.m4.py ${CMAKE_CURRENT_SOURCE_DIR}/version.m4 + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/parse-version.m4.py ${CMAKE_CURRENT_SOURCE_DIR}/version.m4 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) include(${CMAKE_CURRENT_BINARY_DIR}/version.cmake) @@ -339,7 +339,7 @@ add_custom_command( OUTPUT always_rebuild config-version.h - COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/git-version.py + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/git-version.py ) set(HAVE_CONFIG_VERSION_H YES) -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/846?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I350fd615ed8474d34392a057a5f8bded78173949 Gerrit-Change-Number: 846 Gerrit-PatchSet: 3 Gerrit-Owner: plaisthos <[email protected]> Gerrit-Reviewer: flichtenheld <[email protected]> Gerrit-Reviewer: stipa <[email protected]> Gerrit-CC: openvpn-devel <[email protected]> Gerrit-MessageType: merged
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
