ament_package.templates module

ament_package.templates.configure_file(template_file, environment)

Evaluate a .in template file used in CMake with configure_file.

Parameters:
  • template_file – path to the template, str

  • environment – dictionary of placeholders to substitute, dict

Returns:

string with evaluates template

Raises:

KeyError for placeholders in the template which are not in the environment

ament_package.templates.configure_string(template, environment)

Substitute variables enclosed by @ characters.

Parameters:
  • template – the template, str

  • environment – dictionary of placeholders to substitute, dict

Returns:

string with evaluates template

Raises:

KeyError for placeholders in the template which are not in the environment

ament_package.templates.get_environment_hook_template_path(name)
ament_package.templates.get_package_level_template_names(all_platforms=False)
ament_package.templates.get_package_level_template_path(name)
ament_package.templates.get_prefix_level_template_names(*, all_platforms=False)
ament_package.templates.get_prefix_level_template_path(name)