From 00c6fbf040357bb246c0e22d5551e7f9e6693c75 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 3 Oct 2024 14:18:12 -0400 Subject: [PATCH] Stop using python_cmake_module. (#760) We really don't need it anymore, and can just use the builtin find_package(Python3). Signed-off-by: Chris Lalancette --- launch_testing_ament_cmake/CMakeLists.txt | 4 ---- launch_testing_ament_cmake/cmake/add_launch_test.cmake | 7 +------ .../launch_testing_ament_cmake-extras.cmake | 3 --- launch_testing_ament_cmake/package.xml | 2 -- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/launch_testing_ament_cmake/CMakeLists.txt b/launch_testing_ament_cmake/CMakeLists.txt index fccdfb5b6..9ab3f5781 100644 --- a/launch_testing_ament_cmake/CMakeLists.txt +++ b/launch_testing_ament_cmake/CMakeLists.txt @@ -24,10 +24,6 @@ if(BUILD_TESTING) message(FATAL_ERROR "launch_testing package not found") endif() - # Provides PYTHON_EXECUTABLE_DEBUG - find_package(python_cmake_module REQUIRED) - find_package(PythonExtra REQUIRED) - # Test argument passing. This test won't pass unless you give it an argument add_launch_test( "${LAUNCH_TESTING_INSTALL_PREFIX}/share/launch_testing/examples/args_launch_test.py" diff --git a/launch_testing_ament_cmake/cmake/add_launch_test.cmake b/launch_testing_ament_cmake/cmake/add_launch_test.cmake index 4e9216cff..b9b19b3dc 100644 --- a/launch_testing_ament_cmake/cmake/add_launch_test.cmake +++ b/launch_testing_ament_cmake/cmake/add_launch_test.cmake @@ -60,12 +60,7 @@ macro(parse_launch_test_arguments namespace filename) endif() if(NOT ${namespace}_PYTHON_EXECUTABLE) - set(${namespace}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") - if(WIN32) - if(CMAKE_BUILD_TYPE STREQUAL "Debug") - set(${namespace}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}") - endif() - endif() + set(${namespace}_PYTHON_EXECUTABLE "${Python3_EXECUTABLE}") endif() set(${namespace}_FILE_NAME NOTFOUND) diff --git a/launch_testing_ament_cmake/launch_testing_ament_cmake-extras.cmake b/launch_testing_ament_cmake/launch_testing_ament_cmake-extras.cmake index 232c550f5..17abc41f2 100644 --- a/launch_testing_ament_cmake/launch_testing_ament_cmake-extras.cmake +++ b/launch_testing_ament_cmake/launch_testing_ament_cmake-extras.cmake @@ -13,8 +13,5 @@ # limitations under the License. find_package(ament_cmake_test REQUIRED) -# Provides PYTHON_EXECUTABLE_DEBUG -find_package(python_cmake_module REQUIRED) -find_package(PythonExtra REQUIRED) include("${launch_testing_ament_cmake_DIR}/add_launch_test.cmake") diff --git a/launch_testing_ament_cmake/package.xml b/launch_testing_ament_cmake/package.xml index a8b1bf28c..64240039f 100644 --- a/launch_testing_ament_cmake/package.xml +++ b/launch_testing_ament_cmake/package.xml @@ -21,12 +21,10 @@ ament_cmake ament_cmake_test - python_cmake_module launch_testing ament_cmake_copyright launch_testing - python_cmake_module ament_cmake