colcon / colcon-ros

Extension for colcon to support ROS packages
http://colcon.readthedocs.io
Apache License 2.0
13 stars 26 forks source link

Move ament_python metadata extraction to augmentation module #135

Closed cottsay closed 2 years ago

cottsay commented 2 years ago

This will give other extensions and users finer control over ROS package identification, and aligns this extension better with the same process as is performed in colcon-core and colcon-python-setup-py.

The only change in behavior during typical use should be that ROS packages which declare their build_type as ament_python but which contain no setup.py files will no longer be skipped with an error message. Instead, the package will fail to build with a message stating that the setup.py could not be found:

/usr/bin/python3: can't open file 'src/foo/setup.py': [Errno 2] No such file or directory

The change in behavior also aligns better with ROS cmake and ament_cmake projects, where a missing CMakeLists.txt, though a critical omission, does not affect the ability to identify the project and will instead result in a build failure.