craft_parts.plugins.autotools_plugin module

The autotools plugin implementation.

class craft_parts.plugins.autotools_plugin.AutotoolsPlugin(*, properties, part_info)

Bases: Plugin

The autotools plugin is used for autotools-based parts.

Autotools-based projects are the ones that have the usual ./configure && make && make install instruction set.

This plugin will check for the existence of a ‘configure’ file, if one cannot be found, it will first try to run ‘autogen.sh’ or ‘bootstrap’ to generate one.

This plugin uses the common plugin keys as well as those for “sources”. For more information check the ‘plugins’ topic for the former and the ‘sources’ topic for the latter.

In addition, this plugin uses the following plugin-specific keys:

  • autotools-bootstrap-parameters (list of strings) bootstrap flags to pass to the build if a bootstrap file is found in the project. These can in some cases be seen by running ‘./bootstrap –help’

  • autotools-configure-parameters (list of strings) configure flags to pass to the build such as those shown by running ‘./configure –help’

Parameters:
default_configure_parameters: list[str] = []
get_build_commands()

Return a list of commands to run during the build step.

Return type:

list[str]

get_build_environment()

Return a dictionary with the environment to use in the build step.

Return type:

dict[str, str]

get_build_packages()

Return a set of required packages to install in the build environment.

Return type:

set[str]

get_build_snaps()

Return a set of required snaps to install in the build environment.

Return type:

set[str]

properties_class

alias of AutotoolsPluginProperties

class craft_parts.plugins.autotools_plugin.AutotoolsPluginProperties(**data)

Bases: PluginProperties

The part properties used by the autotools plugin.

Parameters:

data (Any)

autotools_bootstrap_parameters: list[str]

The bootstrap flags to pass to Autotools, if the part has a bootstrap file.

In some cases, bootstrap files can be found by running ./bootstrap --help.

autotools_configure_parameters: list[str]

The parameters to pass to Autotools.

disable_parallel: bool
model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plugin: Literal['autotools']
source: str