diff options
author | João Valverde <j@v6e.pt> | 2023-05-26 22:44:19 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-05-26 22:55:47 +0100 |
commit | f0e4c5262dab59a880a207352fce80a746ec2281 (patch) | |
tree | 91e6370e3ff999ef1d6bbb070a04e0713973e940 /cmake/modules | |
parent | 69327113ef4b2c30cee7398cadd1e4139984381b (diff) |
Revert "CMake: Replace deprecated module FindPythonInterp"
This reverts commit d6380e7ae40ec53cbd9119e9527546656f82d660.
Turns out we were unwittingly still using FindPythonInterp
instead of FindPython3.cmake, via LocatePythonModule.cmake,
nd this commit actually enabled FindPython3.cmake. Also turns
out FindPython3.cmake is far too clever and very buggy with MSYS2.
It will usually not find the correct python binary and fail in many
suprising ways, depending on which combination of Python Windows
installations is present.
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindAsciidoctor.cmake | 2 | ||||
-rw-r--r-- | cmake/modules/UseAsn2Wrs.cmake | 6 | ||||
-rw-r--r-- | cmake/modules/UseMakePluginReg.cmake | 2 | ||||
-rw-r--r-- | cmake/modules/UseMakeTaps.cmake | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake index b317117a2f..124cc6999f 100644 --- a/cmake/modules/FindAsciidoctor.cmake +++ b/cmake/modules/FindAsciidoctor.cmake @@ -127,7 +127,7 @@ if(ASCIIDOCTOR_EXECUTABLE) ADD_CUSTOM_COMMAND( OUTPUT ${_output_txt} - COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py ${_output_html} > ${_output_txt} DEPENDS diff --git a/cmake/modules/UseAsn2Wrs.cmake b/cmake/modules/UseAsn2Wrs.cmake index 271126c1a3..d619aa02a9 100644 --- a/cmake/modules/UseAsn2Wrs.cmake +++ b/cmake/modules/UseAsn2Wrs.cmake @@ -37,7 +37,7 @@ function(ASN2WRS) # Creates a dissector in the source directory and store the timestamp. add_custom_command( OUTPUT packet-${PROTOCOL_NAME}-stamp - COMMAND "${Python3_EXECUTABLE}" + COMMAND "${PYTHON_EXECUTABLE}" ${CMAKE_SOURCE_DIR}/tools/asn2wrs.py ${A2W_FLAGS} ${PROTO_OPT} @@ -47,7 +47,7 @@ function(ASN2WRS) -O "${A2W_OUTPUT_DIR}" ${EXT_ASN_FILE_LIST} ${ASN_FILE_LIST} ${EXT_ASN_FILE_LIST_LATE} COMMAND - "${Python3_EXECUTABLE}" -c + "${PYTHON_EXECUTABLE}" -c "import shutil, sys; x,s,d=sys.argv; open(d, 'w'); shutil.copystat(s, d)" "${A2W_OUTPUT_DIR}/packet-${PROTOCOL_NAME}.c" packet-${PROTOCOL_NAME}-stamp @@ -66,7 +66,7 @@ function(ASN2WRS) foreach(_asn2wrs_export_file IN LISTS EXPORT_FILES) add_custom_command( OUTPUT ${_asn2wrs_export_file} - COMMAND "${Python3_EXECUTABLE}" + COMMAND "${PYTHON_EXECUTABLE}" ${CMAKE_SOURCE_DIR}/tools/asn2wrs.py -E ${A2W_FLAGS} diff --git a/cmake/modules/UseMakePluginReg.cmake b/cmake/modules/UseMakePluginReg.cmake index 0c7198d8f4..fe5738110e 100644 --- a/cmake/modules/UseMakePluginReg.cmake +++ b/cmake/modules/UseMakePluginReg.cmake @@ -4,7 +4,7 @@ function(register_plugin_files _outputfile _registertype) add_custom_command( OUTPUT ${_outputfile} - COMMAND ${Python3_EXECUTABLE} + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py ${CMAKE_CURRENT_SOURCE_DIR} ${_registertype} diff --git a/cmake/modules/UseMakeTaps.cmake b/cmake/modules/UseMakeTaps.cmake index 56fd628a80..aed93183ce 100644 --- a/cmake/modules/UseMakeTaps.cmake +++ b/cmake/modules/UseMakeTaps.cmake @@ -5,7 +5,7 @@ MACRO(REGISTER_TAP_FILES _outputfile) OUTPUT ${_outputfile} COMMAND - ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-regs.py taps ${_outputfile} ${_sources} + ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-regs.py taps ${_outputfile} ${_sources} DEPENDS ${CMAKE_SOURCE_DIR}/tools/make-regs.py ${_sources} |