diff --git a/source/How-To-Guides/Ament-CMake-Python-Documentation.rst b/source/How-To-Guides/Ament-CMake-Python-Documentation.rst index f7c70a8acaa..d42113abf90 100644 --- a/source/How-To-Guides/Ament-CMake-Python-Documentation.rst +++ b/source/How-To-Guides/Ament-CMake-Python-Documentation.rst @@ -14,6 +14,13 @@ See the :doc:`ament_cmake user documentation ` for mo To create an ``ament_python`` package, see :doc:`Creating your first ROS 2 package <../Tutorials/Beginner-Client-Libraries/Creating-Your-First-ROS2-Package>`. ``ament_cmake_python`` should only be used in cases where that is not possible, like when mixing C/C++ and Python code. + +.. warning:: + + Calling ``rosidl_generate_interfaces`` and ``ament_python_install_package`` in the same CMake project does not work. + See this `Github issue `_ for more info. It is best practice to instead + separate out the message generation into a separate package. + .. contents:: Table of Contents :depth: 2 :local: diff --git a/source/How-To-Guides/Developing-a-ROS-2-Package.rst b/source/How-To-Guides/Developing-a-ROS-2-Package.rst index 3b8a812c0b2..c169776458c 100644 --- a/source/How-To-Guides/Developing-a-ROS-2-Package.rst +++ b/source/How-To-Guides/Developing-a-ROS-2-Package.rst @@ -145,3 +145,11 @@ and a ``setup.py`` file that looks like: ], }, ) + + +Combined C++ and Python Packages +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When writing a package with both C++ and Python code, the +``setup.py`` file and ``setup.cfg`` file are not used. +Instead, use :doc:`ament_cmake_python <./Ament-CMake-Python-Documentation>`. \ No newline at end of file