ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Ament build for python packages with dependencies

Hi all, I am building a python package that depends on a pypi package. I include the name of the pypi package in the “install_requires” list in the setup.py file. If I build the package with “python3 setup.py install” the dependency is built as well and everything runs well. If instead I build with “ament build” then the package builds without errors but the dependency is not actually included. I guess I had assumed that ament build essentially did a “python3 setup.py install” under the hood, but would also somehow manage to put those dependencies in the site-packages in the install folder as well. I am on beta 3. Thanks for all you do!

ament_tools does not install any dependencies (see https://github.com/ament/ament_tools/blob/7f048657ac2b5e3f98047852b8225e0ce254dd9c/ament_tools/build_types/ament_python.py#L163-L164). In ROS we use rosdep for that task.