Skip to content

Commit ba3259c

Browse files
committed
Missed actually using the new variables from the new calls to get Python
1 parent 34bb8f0 commit ba3259c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

compiler/cpp/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ endforeach()
3232

3333
find_package(Python3 COMPONENTS Interpreter QUIET)
3434
if(Python3_Interpreter_FOUND)
35-
add_test(NAME StalenessCheckTest COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/compiler/staleness_check.py ${THRIFT_COMPILER})
35+
add_test(NAME StalenessCheckTest COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/compiler/staleness_check.py ${THRIFT_COMPILER})
3636
else()
3737
message(WARNING "Skipping StalenessCheckTest as there is no python interpreter available.")
3838
endif()

lib/py/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
# under the License.
1818
#
1919

20-
include_directories(${PYTHON_INCLUDE_DIRS})
20+
include_directories(${Python3_INCLUDE_DIRS})
2121

2222
add_custom_target(python_build ALL
2323
COMMAND ${THRIFT_COMPILER} --gen py test/test_thrift_file/TestServer.thrift
24-
COMMAND ${PYTHON_EXECUTABLE} setup.py build
24+
COMMAND Python3::Interpreter setup.py build
2525
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
2626
COMMENT "Building Python library"
2727
)
2828

2929
if(BUILD_TESTING)
30-
add_test(PythonTestSSLSocket ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/test_sslsocket.py)
31-
add_test(PythonThriftJson ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_json.py)
32-
add_test(PythonThriftTransport ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_transport.py)
33-
add_test(PythonThriftTBinaryProtocol ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TBinaryProtocol.py)
34-
add_test(PythonThriftTZlibTransport ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TZlibTransport.py)
35-
add_test(PythonThriftProtocol ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TCompactProtocol.py)
36-
add_test(PythonThriftTNonblockingServer ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TNonblockingServer.py)
30+
add_test(NAME PythonTestSSLSocket COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/test_sslsocket.py)
31+
add_test(NAME PythonThriftJson COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_json.py)
32+
add_test(NAME PythonThriftTransport COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_transport.py)
33+
add_test(NAME PythonThriftTBinaryProtocol COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TBinaryProtocol.py)
34+
add_test(NAME PythonThriftTZlibTransport COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TZlibTransport.py)
35+
add_test(NAME PythonThriftProtocol COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TCompactProtocol.py)
36+
add_test(NAME PythonThriftTNonblockingServer COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/test/thrift_TNonblockingServer.py)
3737
endif()

test/py/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ add_test(NAME python_test_generate
2727
)
2828

2929
add_test(NAME python_test
30-
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/RunClientServer.py --gen-base=${CMAKE_CURRENT_BINARY_DIR}
30+
COMMAND Python3::Interpreter ${CMAKE_CURRENT_SOURCE_DIR}/RunClientServer.py --gen-base=${CMAKE_CURRENT_BINARY_DIR}
3131
DEPENDS python_test_generate
3232
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
3333
)

0 commit comments

Comments
 (0)