craft_parts.plugins.make_plugin module

The make plugin implementation.

class craft_parts.plugins.make_plugin.MakePlugin(*, properties, part_info)[source]

Bases: Plugin

A plugin useful for building make-based parts.

Make-based projects are projects that have a Makefile that drives the build.

This plugin always runs ‘make’ followed by ‘make install’, except when the ‘artifacts’ keyword is used.

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.

Additionally, this plugin uses the following plugin-specific keywords:

  • make-parameters (list of strings) Pass the given parameters to the make command.

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 MakePluginProperties

class craft_parts.plugins.make_plugin.MakePluginProperties(**data)[source]

Bases: PluginProperties

The part properties used by the make plugin.

Parameters:

data (Any)

make_parameters: list[str]
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

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].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'make_parameters': FieldInfo(annotation=list[str], required=False, default=[], alias='make-parameters', alias_priority=1), 'plugin': FieldInfo(annotation=Literal['make'], required=False, default='make', alias='plugin', alias_priority=1), 'source': FieldInfo(annotation=str, required=True, alias='source', alias_priority=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

plugin: Literal['make']
source: str