colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
103 stars 46 forks source link

ament_cmake_python Support? #524

Closed danzimmerman closed 2 years ago

danzimmerman commented 2 years ago

The ROS2 docs describe a build type of ament_cmake_python where you can mix ament_cmake and ament_python builds in a single package:

https://docs.ros.org/en/humble/How-To-Guides/Ament-CMake-Python-Documentation.html#using-ament-cmake-python

If I try to follow along there, I get a warning:

[0.454s] colcon.colcon_core.verb WARNING No task extension to 'build' a 'ros.ament_cmake_python' package

and it doesn't seem like the package gets processed correctly.

I'm wondering if this type of package is actually supported at this time? Is there an extra Colcon package I need to install?

I'm running colcon-common-extensions version 0.3.0. Apologies if this is the wrong repo to raise this issue.

christophebedard commented 2 years ago

https://docs.ros.org/en/humble/How-To-Guides/Ament-CMake-Python-Documentation.html#using-ament-cmake-python

As mentioned at the very top of that page, ament_cmake_python is not a build type:

ament_cmake_python is a package that provides CMake functions for packages of the ament_cmake build type that contain Python code.

You are not mixing with the ament_python build type, you're just using Python code in your ament_cmake-type package using the utilities provided by the ament_cmake_python package.

Your package should still be an ament_cmake package, i.e., your package.xml should contain <build_type>ament_cmake</build_type>. You can use ament_cmake_python as shown on the ament_cmake_python user documentation page.

danzimmerman commented 2 years ago

Thanks, closing for lack of reading comprehension.