craft_parts.plugins.autotools_plugin module

The autotools plugin implementation.

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

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 keywords 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 keywords:

  • 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:
get_build_commands()[source]

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

Return type:

List[str]

get_build_environment()[source]

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

Return type:

Dict[str, str]

get_build_packages()[source]

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

Return type:

Set[str]

get_build_snaps()[source]

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)[source]

Bases: PluginProperties, PluginModel

The part properties used by the autotools plugin.

Parameters:

data (Any) –

autotools_bootstrap_parameters: List[str]
autotools_configure_parameters: List[str]
source: str
classmethod unmarshal(data)[source]

Populate autotools properties from the part specification.

Parameters:

data (Dict[str, Any]) – A dictionary containing part properties.

Return type:

AutotoolsPluginProperties

Returns:

The populated plugin properties data object.

Raises:

pydantic.ValidationError – If validation fails.