craft_parts.plugins.python_plugin module¶
The python plugin.
- class craft_parts.plugins.python_plugin.PythonPlugin(*, properties, part_info)[source]¶
Bases:
BasePythonPlugin
A plugin to build python parts.
- Parameters:
properties (
PluginProperties
)part_info (
PartInfo
)
- properties_class¶
alias of
PythonPluginProperties
- class craft_parts.plugins.python_plugin.PythonPluginProperties(**data)[source]¶
Bases:
PluginProperties
The part properties used by the python 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['python'], required=False, default='python', alias='plugin', alias_priority=1), 'python_constraints': FieldInfo(annotation=list[str], required=False, default=[], alias='python-constraints', alias_priority=1), 'python_packages': FieldInfo(annotation=list[str], required=False, default=['pip', 'setuptools', 'wheel'], alias='python-packages', alias_priority=1), 'python_requirements': FieldInfo(annotation=list[str], required=False, default=[], alias='python-requirements', 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
['python'
]¶
-
python_constraints:
list
[str
]¶
-
python_packages:
list
[str
]¶
-
python_requirements:
list
[str
]¶
-
source:
str
¶