From 51020f172ff868df3a428793c8450f77ec593892 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Thu, 3 Oct 2024 14:18:44 -0400 Subject: [PATCH] Stop using python_cmake_module. (#304) * Stop using python_cmake_module. We really don't need it anymore, and can just use the builtin find_package(Python3). * Add buildtool dependency on ament_cmake_python. Signed-off-by: Chris Lalancette --- rqt_py_common/CMakeLists.txt | 13 ++----------- rqt_py_common/package.xml | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/rqt_py_common/CMakeLists.txt b/rqt_py_common/CMakeLists.txt index 5a050d9e..d3f5eb1e 100644 --- a/rqt_py_common/CMakeLists.txt +++ b/rqt_py_common/CMakeLists.txt @@ -18,15 +18,6 @@ if(BUILD_TESTING) find_package(rosidl_default_generators REQUIRED) find_package(ament_cmake_pytest REQUIRED) - # Provides PYTHON_EXECUTABLE_DEBUG - find_package(python_cmake_module REQUIRED) - find_package(PythonExtra MODULE) - - if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") - set(${PROJECT_NAME}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}") - else() - set(${PROJECT_NAME}_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") - endif() # use different project name for generated test interfaces in order to make # them importable in the tests beside the Python module of this package @@ -52,8 +43,8 @@ if(BUILD_TESTING) ament_add_pytest_test(${PROJECT_NAME} test ENV "AMENT_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}/ament_index" APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_py - TIMEOUT 90, - PYTHON_EXECUTABLE "${${PROJECT_NAME}_PYTHON_EXECUTABLE}") + TIMEOUT 90 + ) endif() ament_package() diff --git a/rqt_py_common/package.xml b/rqt_py_common/package.xml index 5eb19d3f..dfad1e35 100644 --- a/rqt_py_common/package.xml +++ b/rqt_py_common/package.xml @@ -23,6 +23,7 @@ Isaac Saito ament_cmake + ament_cmake_python qtbase5-dev rclpy @@ -33,7 +34,6 @@ ament_cmake_pytest ament_lint_auto ament_lint_common - python_cmake_module rosidl_default_generators rosidl_default_runtime