craft_parts.sources.sevenzip_source module¶
Implement the 7zip file source handler.
- class craft_parts.sources.sevenzip_source.SevenzipSource(source, part_src_dir, *, cache_dir, project_dirs, source_checksum=None, command=None, ignore_patterns=None, **kwargs)¶
Bases:
FileSourceHandlerThe zip file source handler.
- Parameters:
- provision(dst, keep=False, src=None)¶
Extract 7z file contents to the part source dir.
- source_model¶
alias of
SevenzipSourceModel
- class craft_parts.sources.sevenzip_source.SevenzipSourceModel(**data)¶
Bases:
BaseFileSourceModelPydantic for a 7zip file source.
- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function get_model_config.<locals>.<lambda>>, 'extra': 'forbid', 'frozen': True, 'json_schema_extra': {'if': {'not': {'required': ['source-type']}}, 'then': {'properties': {'source': {'pattern': '\\.7z$'}}}}}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pattern: ClassVar[str | None] = '\\.7z$'¶
A regular expression for inferring this source type.
If pattern is None (the default), the source type cannot be inferred and must always be explicitly written in the source-type field of a part.
- source: str¶
- source_checksum: str | None¶