craft_parts.plugins.nil_plugin module¶
The nil plugin.
Using this, parts can be defined purely by utilizing properties that are automatically included, e.g. stage-packages.
- class craft_parts.plugins.nil_plugin.NilPlugin(*, properties, part_info)[source]¶
Bases:
Plugin
A plugin that defines no build commands.
The nil plugin is useful in two contexts:
First, it can be used for parts that identify no source, and can be defined purely by using built-in part properties such as
stage-packages
.The second use is for parts that do define a source (which will be fetched), but for which the build step then needs to be explicitly defined using
override-build
; otherwise, even though the source is fetched, nothing will end up in that part’s install directory. In short, for the case of a part that uses the nil plugin and defines a source, it is up to the developer to then define theoverride-build
step that, in some way, populates the$CRAFT_PART_INSTALL
directory.- Parameters:
properties (
PluginProperties
) –part_info (
PartInfo
) –
- 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
]
- get_pull_commands()[source]¶
Return a list commands to retrieve dependencies during the pull step.
- Return type:
List
[str
]
- properties_class¶
alias of
NilPluginProperties
- supports_strict_mode = True¶
Plugins that can run in ‘strict’ mode must set this classvar to True.
- class craft_parts.plugins.nil_plugin.NilPluginProperties(**data)[source]¶
Bases:
PluginProperties
The part properties used by the nil plugin.
- Parameters:
data (
Any
) –