Understanding the difference between a CMake package (Python package) and an ament CMake package (ament Python package)

asked 2022-09-05 18:50:02 -0500

asperry gravatar image

The About the build system Concepts article on the ROS 2 documentation describes CMake and Python packages and their ament varieties as such:

CMake package

Any package containing a plain CMake project and a package.xml manifest file.

ament CMake package

A CMake package that also follows the ament packaging guidelines.

Python package

Any package containing a setuptools based Python project and a package.xml manifest file.

ament Python package

A Python package that also follows the ament packaging guidelines.

I am unsure how to tell the difference between plain CMake or Python packages and their ament varieties. The "follows the ament packaging guidelines" language does not answer my question since the article does not say what this means beyond the fact that an ament package contains a package.xml file. For example, both a CMake package and an ament CMake package will contain the same files (package.xml, CMakeLists.txt, etc). The case is similar for a Python package and an ament Python package. Furthermore, the article states that the ament/ament_cmake repository contains "many 'ament CMake' and pure CMake packages" but the package.xml for every package in that repository uses ament_cmake for the <build_type> tag. How can I tell if a particular package is of the ament variety?

My initial guess would be that an ament CMake package has ament_cmake in the <build_type> tag and it makes use of the expanded CMake API provided by the ament/ament_cmake repository. However, for the case of Python packages, the only difference between varieties I can see would be the choice for the <build_type> tag since I believe both plain and ament Python packages will simply use Python setuptools to build the package.

edit retag flag offensive close merge delete