craft_parts.dirs module

Definitions for project directories.

class craft_parts.dirs.ProjectDirs(*, partitions=None, work_dir='.')[source]

Bases: object

The project’s main work directories.

Parameters:
  • work_dir (Union[Path, str]) – The parent directory containing the parts, prime and stage subdirectories. If not specified, the current directory will be used.

  • partitions (Optional[Sequence[str]]) – If partitions are enabled, the list of partitions.

Variables:
  • work_dir – The root of the work directories used for project processing.

  • parts_dir – The directory containing work subdirectories for each part.

  • overlay_dir – The directory containing work subdirectories for overlays.

  • overlay_mount_dir – The mountpoint for the overlay filesystem.

  • overlay_packages_dir – The cache directory for overlay packages.

  • overlay_work_dir – The work directory for the overlay filesystem.

  • stage_dir – The staging area containing installed files from all parts.

  • prime_dir – The primed tree containing the final artifacts to deploy.

get_prime_dir(partition=None)[source]

Get the stage directory for the given partition.

Parameters:

partition (Optional[str]) –

Return type:

Path

get_stage_dir(partition=None)[source]

Get the stage directory for the given partition.

Parameters:

partition (Optional[str]) –

Return type:

Path