Skip to content

Commit

Permalink
fix: rosidl_cmake python calls is deprecated (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
russkel authored and Yuki Igarashi committed Jun 16, 2024
1 parent 2b4d209 commit ad14727
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 0 additions & 2 deletions cmake/rosidl_generator_mypy_generate_interfaces.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
find_package(rmw REQUIRED)

find_package(PythonInterp 3.6 REQUIRED)

set(_output_path
"${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_mypy/${PROJECT_NAME}")
set(_generated_pyi_files "")
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
<buildtool_export_depend>ament_cmake</buildtool_export_depend>
<buildtool_export_depend>rosidl_cmake</buildtool_export_depend>
<buildtool_export_depend>rosidl_generator_py</buildtool_export_depend>
<buildtool_export_depend>rosidl_pycommon</buildtool_export_depend>

<buildtool_depend>ament_cmake</buildtool_depend>

<build_export_depend>rmw</build_export_depend>

<exec_depend>rosidl_pycommon</exec_depend>
<exec_depend>rosidl_cmake</exec_depend>
<exec_depend>rosidl_generator_py</exec_depend>
<exec_depend>rosidl_parser</exec_depend>
Expand Down
2 changes: 1 addition & 1 deletion resource/_action.pyi.em
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if generate_imports:
}@
@#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@{
from rosidl_cmake import convert_camel_case_to_lower_case_underscore
from rosidl_pycommon import convert_camel_case_to_lower_case_underscore

action_name = '_' + convert_camel_case_to_lower_case_underscore(action.namespaced_type.name)
module_name = '_' + convert_camel_case_to_lower_case_underscore(interface_path.stem)
Expand Down
2 changes: 1 addition & 1 deletion resource/_srv.pyi.em
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if generate_imports:
}@
@#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@{
from rosidl_cmake import convert_camel_case_to_lower_case_underscore
from rosidl_pycommon import convert_camel_case_to_lower_case_underscore

service_name = '_' + convert_camel_case_to_lower_case_underscore(service.namespaced_type.name)
module_name = '_' + convert_camel_case_to_lower_case_underscore(interface_path.stem)
Expand Down
10 changes: 5 additions & 5 deletions rosidl_generator_mypy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
import pathlib
from typing import Dict, List, NamedTuple, Optional, Set, Tuple

from rosidl_cmake import (
convert_camel_case_to_lower_case_underscore,
generate_files,
read_generator_arguments,
)
from rosidl_generator_py import generate_py_impl
from rosidl_parser.definition import (
AbstractNestedType,
Expand All @@ -21,6 +16,11 @@
Service,
)
from rosidl_parser.parser import parse_idl_file
from rosidl_pycommon import (
convert_camel_case_to_lower_case_underscore,
generate_files,
read_generator_arguments,
)

SPECIAL_NESTED_BASIC_TYPES = ["int", "float"]

Expand Down

0 comments on commit ad14727

Please sign in to comment.