Skip to content

Commit

Permalink
Stop using python_cmake_module. (#114)
Browse files Browse the repository at this point in the history
We really don't need it anymore, and can just use the
builtin find_package(Python3).

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Oct 3, 2024
1 parent 800b4c5 commit fe448de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
19 changes: 3 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,24 +132,11 @@ if(BUILD_TESTING)
target_link_libraries(${PROJECT_NAME}-test_message_traits ${PROJECT_NAME} rclcpp::rclcpp ${std_msgs_TARGETS})
endif()

# Provides PYTHON_EXECUTABLE_DEBUG
find_package(python_cmake_module REQUIRED)
find_package(PythonExtra REQUIRED)
set(_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
if(WIN32)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}")
endif()
endif()

# python tests with python interfaces of message filters
find_package(ament_cmake_pytest REQUIRED)
ament_add_pytest_test(directed.py "test/directed.py"
PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}")
ament_add_pytest_test(test_approxsync.py "test/test_approxsync.py"
PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}")
ament_add_pytest_test(test_message_filters_cache.py "test/test_message_filters_cache.py"
PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}")
ament_add_pytest_test(directed.py "test/directed.py")
ament_add_pytest_test(test_approxsync.py "test/test_approxsync.py")
ament_add_pytest_test(test_message_filters_cache.py "test/test_message_filters_cache.py")
endif()

ament_package()
1 change: 0 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

<buildtool_depend>ament_cmake_python</buildtool_depend>
<buildtool_depend>ament_cmake_ros</buildtool_depend>
<buildtool_depend>python_cmake_module</buildtool_depend>

<depend>rclcpp</depend>
<depend>rcutils</depend>
Expand Down

0 comments on commit fe448de

Please sign in to comment.