I have simple launch package which consists of a CMakeLists.txt, package.xml and a launch folder with a python launch file. I would like to add a launch test to the repo so I add <test_depend>launch_testing_ament_cmake</test_depend> to the package.xml.
Then when building with colcon build I get the following error:
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
(Required is at least version "3.5")
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.22/Modules/FindPythonLibs.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
/opt/ros/humble/share/python_cmake_module/cmake/Modules/FindPythonExtra.cmake:140 (find_package)
/opt/ros/humble/share/launch_testing_ament_cmake/cmake/launch_testing_ament_cmake-extras.cmake:18 (find_package)
/opt/ros/humble/share/launch_testing_ament_cmake/cmake/launch_testing_ament_cmakeConfig.cmake:41 (include)
/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake:36 (find_package)
CMakeLists.txt:21 (ament_lint_auto_find_test_dependencies)
I would like to add_launch_test() to the CMakeLists and then add the actual test.
Actual behavior
The python error shown. Same error occurs when doing a find_package(launch_testing_ament_cmake REQUIRED)
instead of the ament_auto_find_test_dependencies()
Additional information
This package doesn't contain any other code. I have launch_testing properly installed because other packages in the same workspace use it without any issue.
Bug report
Required Info:
Steps to reproduce issue
I have simple launch package which consists of a
CMakeLists.txt
,package.xml
and a launch folder with a python launch file. I would like to add a launch test to the repo so I add<test_depend>launch_testing_ament_cmake</test_depend>
to thepackage.xml
.Then when building with
colcon build
I get the following error:The contents of
package.xml
:CMakeLists.txt
:Expected behavior
I would like to
add_launch_test()
to the CMakeLists and then add the actual test.Actual behavior
The python error shown. Same error occurs when doing a
find_package(launch_testing_ament_cmake REQUIRED)
instead of theament_auto_find_test_dependencies()
Additional information
This package doesn't contain any other code. I have
launch_testing
properly installed because other packages in the same workspace use it without any issue.ros2 humble