craft_parts.plugins.qmake_plugin module¶
The qmake plugin.
- class craft_parts.plugins.qmake_plugin.QmakePlugin(*, properties, part_info)[source]¶
Bases:
Plugin
The qmake plugin is useful for building qmake-based parts.
These are projects that are built using .pro files.
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:
qmake-parameters: (list of strings) additional options to pass to the qmake invocation.
qmake-project-file: (string) the qmake project file to use. This is usually only needed if qmake can not determine what project file to use on its own.
qmake_major_version: (int) set the qt major version. This is only needed to support qt6 builds. Version 5 is default.
- 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
]
- classmethod get_out_of_source_build()[source]¶
Return whether the plugin performs out-of-source-tree builds.
- Return type:
bool
- properties_class¶
alias of
QmakePluginProperties
- class craft_parts.plugins.qmake_plugin.QmakePluginProperties(**data)[source]¶
Bases:
PluginProperties
The part properties used by the qmake plugin.
- Parameters:
data (
Any
)
- 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]] = {'plugin': FieldInfo(annotation=Literal['qmake'], required=False, default='qmake', alias='plugin', alias_priority=1), 'qmake_major_version': FieldInfo(annotation=int, required=False, default=5, alias='qmake-major-version', alias_priority=1), 'qmake_parameters': FieldInfo(annotation=list[str], required=False, default=[], alias='qmake-parameters', alias_priority=1), 'qmake_project_file': FieldInfo(annotation=str, required=False, default='', alias='qmake-project-file', 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
['qmake'
]¶
-
qmake_major_version:
int
¶
-
qmake_parameters:
list
[str
]¶
-
qmake_project_file:
str
¶
-
source:
str
¶