craft_parts.sources.local_source module¶
The local source handler and helpers.
- class craft_parts.sources.local_source.LocalSource(*args, project_dirs, copy_function=<function link_or_copy>, **kwargs)¶
Bases:
SourceHandlerThe local source handler.
- check_if_outdated(target, *, ignore_files=None)¶
Check if pulled sources have changed since target was created.
- get_outdated_files()¶
Obtain lists of outdated files and directories.
- source_model¶
alias of
LocalSourceModel
- update()¶
Update pulled source.
Call method
check_if_outdated()before updating to populate the lists of files and directories to copy.- Return type:
- class craft_parts.sources.local_source.LocalSourceModel(**data)¶
Bases:
BaseSourceModelPydantic model for a generic local 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': '^\\./?'}}}}}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].