Skip to content

Commit f3a326c

Browse files
authored
Cleanup the rclpy dependencies. (#1482)
Most importantly, we switch all dependencies to split out <build_depend>/<exec_depend>, rather than using <depend>. That's because <depend> implies <build_export_depend>, but we never want downstream libraries to link against nor try to #include the library that we build here. Signed-off-by: Chris Lalancette <clalancette@gmail.com>
1 parent 3e79554 commit f3a326c

File tree

3 files changed

+32
-15
lines changed

3 files changed

+32
-15
lines changed

rclpy/package.xml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,45 @@
1717

1818
<buildtool_depend>ament_cmake</buildtool_depend>
1919

20+
<build_depend>lifecycle_msgs</build_depend>
21+
<build_depend>rcl</build_depend>
22+
<build_depend>rcl_action</build_depend>
23+
<build_depend>rcl_interfaces</build_depend>
24+
<build_depend>rcl_lifecycle</build_depend>
25+
<build_depend>rcl_logging_interface</build_depend>
26+
<build_depend>rcl_yaml_param_parser</build_depend>
2027
<build_depend>pybind11_vendor</build_depend>
2128
<build_depend>python3-dev</build_depend>
2229
<build_depend>rcpputils</build_depend>
2330
<build_depend>rcutils</build_depend>
31+
<build_depend>rmw</build_depend>
32+
<build_depend>rmw_implementation</build_depend>
2433
<build_depend>rmw_implementation_cmake</build_depend>
25-
26-
<depend>lifecycle_msgs</depend>
27-
<depend>rcl</depend>
28-
<depend>rcl_interfaces</depend>
29-
<depend>rcl_lifecycle</depend>
30-
<depend>rcl_logging_interface</depend>
31-
<depend>rcl_action</depend>
32-
<depend>rcl_yaml_param_parser</depend>
33-
<depend>rmw</depend>
34-
<depend>rmw_implementation</depend>
35-
<depend>rosidl_runtime_c</depend>
36-
<depend>type_description_interfaces</depend>
37-
<depend>unique_identifier_msgs</depend>
34+
<build_depend>rosidl_runtime_c</build_depend>
35+
<build_depend>type_description_interfaces</build_depend>
3836

3937
<exec_depend>action_msgs</exec_depend>
4038
<exec_depend>ament_index_python</exec_depend>
4139
<exec_depend>builtin_interfaces</exec_depend>
40+
<exec_depend>lifecycle_msgs</exec_depend>
4241
<exec_depend>python3-typing-extensions</exec_depend>
4342
<exec_depend>python3-yaml</exec_depend>
43+
<exec_depend>rcl</exec_depend>
44+
<exec_depend>rcl_action</exec_depend>
45+
<exec_depend>rcl_interfaces</exec_depend>
46+
<exec_depend>rcl_lifecycle</exec_depend>
47+
<exec_depend>rcl_logging_interface</exec_depend>
48+
<exec_depend>rcl_yaml_param_parser</exec_depend>
49+
<exec_depend>rcpputils</exec_depend>
50+
<exec_depend>rcutils</exec_depend>
51+
<exec_depend>rmw</exec_depend>
52+
<exec_depend>rmw_implementation</exec_depend>
4453
<exec_depend>rosgraph_msgs</exec_depend>
54+
<exec_depend>rosidl_runtime_c</exec_depend>
4555
<exec_depend>rpyutils</exec_depend>
4656
<exec_depend>service_msgs</exec_depend>
57+
<exec_depend>type_description_interfaces</exec_depend>
58+
<exec_depend>unique_identifier_msgs</exec_depend>
4759

4860
<test_depend>ament_cmake_gtest</test_depend>
4961
<test_depend>ament_cmake_pytest</test_depend>

rclpy/src/rclpy/type_description_service.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414

1515
#include <pybind11/pybind11.h>
1616

17+
#include <rcl/node.h>
18+
#include <rcl/service.h>
19+
20+
#include <rmw/types.h>
21+
22+
#include <type_description_interfaces/msg/type_description.h>
23+
1724
#include "type_description_service.hpp"
1825
#include "utils.hpp"
1926

rclpy/src/rclpy/type_description_service.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
#include <pybind11/pybind11.h>
1919

20-
#include <rmw/types.h>
21-
2220
#include <memory>
2321

2422
#include "destroyable.hpp"

0 commit comments

Comments
 (0)