Skip to content

Commit 9d396ad

Browse files
committed
install spawner/unspawner using console_script entrypoint
1 parent 2275f06 commit 9d396ad

File tree

7 files changed

+7
-51
lines changed

7 files changed

+7
-51
lines changed

controller_manager/CMakeLists.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
66
endif()
77

88
find_package(ament_cmake REQUIRED)
9+
find_package(ament_cmake_python REQUIRED)
910
find_package(ament_cmake_core REQUIRED)
1011
find_package(ament_index_cpp REQUIRED)
1112
find_package(controller_interface REQUIRED)
@@ -53,14 +54,6 @@ install(DIRECTORY include/
5354
DESTINATION include
5455
)
5556

56-
install(PROGRAMS
57-
scripts/spawner
58-
scripts/spawner.py # Deprecated
59-
scripts/unspawner
60-
scripts/unspawner.py # Deprecated
61-
DESTINATION lib/${PROJECT_NAME}
62-
)
63-
6457
if(BUILD_TESTING)
6558
find_package(ament_cmake_gmock REQUIRED)
6659
find_package(ament_cmake_gtest REQUIRED)
@@ -160,7 +153,7 @@ if(BUILD_TESTING)
160153
endif()
161154

162155
# Install Python modules
163-
ament_python_install_package(${PROJECT_NAME})
156+
ament_python_install_package(${PROJECT_NAME} SCRIPTS_DESTINATION lib/${PROJECT_NAME})
164157

165158
ament_export_libraries(
166159
controller_manager

controller_manager/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<license>Apache License 2.0</license>
99

1010
<buildtool_depend>ament_cmake</buildtool_depend>
11+
<buildtool_depend>ament_cmake_python</buildtool_depend>
1112

1213
<depend>ament_index_cpp</depend>
1314
<depend>controller_interface</depend>

controller_manager/scripts/spawner

Lines changed: 0 additions & 21 deletions
This file was deleted.

controller_manager/scripts/unspawner

Lines changed: 0 additions & 21 deletions
This file was deleted.

controller_manager/setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[options.entry_points]
2+
console_scripts =
3+
spawner = controller_manager.spawner:main
4+
unspawner = controller_manager.unspawner:main

0 commit comments

Comments
 (0)