Skip to content

Commit d68c385

Browse files
authored
Install generated Python interfaces in a Python package (#131)
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
1 parent 5b9fe9c commit d68c385

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,7 @@ rosidl_write_generator_arguments(
121121
)
122122

123123
if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
124-
ament_python_install_module("${_output_path}/__init__.py"
125-
DESTINATION_SUFFIX "${PROJECT_NAME}"
126-
)
127-
128-
# TODO(esteve): replace this with ament_python_install_module and allow a list
129-
# of modules to be passed instead of iterating over _generated_py_files
130-
# See https://github.com/ros2/rosidl/issues/89
131-
foreach(_generated_py_dir ${_generated_py_dirs})
132-
install(DIRECTORY "${_output_path}/${_generated_py_dir}/"
133-
DESTINATION "${PYTHON_INSTALL_DIR}/${PROJECT_NAME}/${_generated_py_dir}"
134-
PATTERN "*.py"
135-
)
136-
endforeach()
124+
ament_python_install_package(${PROJECT_NAME} PACKAGE_DIR "${_output_path}")
137125
endif()
138126

139127
set(_target_suffix "__py")

0 commit comments

Comments
 (0)