Skip to content

Commit

Permalink
Stop using python_cmake_module. (#93)
Browse files Browse the repository at this point in the history
* Stop using python_cmake_module.

We really don't need it anymore, and can just use the
builtin find_package(Python3).

* Add in missing ament_cmake_python dependency.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
  • Loading branch information
clalancette authored Oct 3, 2024
1 parent 97e1b4a commit 291fcb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)

find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
Expand Down Expand Up @@ -81,24 +82,11 @@ if(BUILD_TESTING)
target_link_libraries(projection_test laser_geometry rclcpp::rclcpp)
endif()

# Python test
# Provides PYTHON_EXECUTABLE_DEBUG
find_package(python_cmake_module REQUIRED)
find_package(PythonExtra REQUIRED)

set(_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug")
set(PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}")
endif()

find_package(ament_cmake_pytest REQUIRED)

ament_add_pytest_test(projection test/projection_test.py
TIMEOUT 120
PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}"
)

set(PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}")
endif()

ament_package()
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<author email="william@osrfoundation.org">William Woodall</author>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>ament_cmake_python</buildtool_depend>
<buildtool_depend>eigen3_cmake_module</buildtool_depend>

<buildtool_export_depend>eigen3_cmake_module</buildtool_export_depend>
Expand All @@ -47,7 +48,6 @@
<test_depend>ament_lint_common</test_depend>
<test_depend>ament_cmake_gtest</test_depend>
<test_depend>ament_cmake_pytest</test_depend>
<test_depend>python_cmake_module</test_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down

0 comments on commit 291fcb3

Please sign in to comment.