craft-application 6.2.0__tar.gz → 6.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {craft_application-6.2.0 → craft_application-6.2.2}/.pre-commit-config.yaml +1 -1
- {craft_application-6.2.0/craft_application.egg-info → craft_application-6.2.2}/PKG-INFO +1 -1
- craft_application-6.2.2/craft_application/_config.py +68 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/_version.py +3 -3
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/application.py +26 -1
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/buildplan.py +1 -1
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/config.py +13 -3
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/package.py +7 -4
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/service_factory.py +5 -5
- {craft_application-6.2.0 → craft_application-6.2.2/craft_application.egg-info}/PKG-INFO +1 -1
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application.egg-info/SOURCES.txt +4 -0
- craft_application-6.2.2/docs/common/craft-application/reference/strict-platform-names.rst +23 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/conf.py +2 -4
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/application.rst +1 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/changelog.rst +31 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/models/platforms.rst +5 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/models/project.rst +5 -0
- craft_application-6.2.2/docs/reference/services/buildplan.rst +24 -0
- craft_application-6.2.2/docs/reference/services/config.rst +71 -0
- craft_application-6.2.2/docs/reference/services/index.rst +28 -0
- craft_application-6.2.2/docs/reference/services/package.rst +21 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/pyproject.toml +1 -1
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/plugin-groups/task.yaml +1 -1
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_application.py +58 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/uv.lock +4 -4
- craft_application-6.2.0/craft_application/_config.py +0 -40
- craft_application-6.2.0/docs/reference/services/index.rst +0 -11
- {craft_application-6.2.0 → craft_application-6.2.2}/.editorconfig +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/.jira_sync_config.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/CODEOWNERS +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/ISSUE_TEMPLATE/bug.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/ISSUE_TEMPLATE/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/release-drafter.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/renovate.json5 +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/workflows/check-renovate.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/workflows/policy.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/workflows/qa.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/workflows/release-publish.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/workflows/spread.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.github/workflows/tics.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.gitignore +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.prettierignore +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/.readthedocs.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/CONTRIBUTING.md +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/LICENSE +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/Makefile +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/README.md +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/SECURITY.md +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/common.mk +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/_const.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/commands/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/commands/base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/commands/init.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/commands/lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/commands/other.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/commands/remote.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/fetch.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/git/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/git/_consts.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/git/_errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/git/_git_repo.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/git/_models.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/git/_utils.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/grammar.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/launchpad.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/build.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/code.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/distro.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/models/recipe.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/launchpad/util.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/misc/instance_bashrc +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/constraints.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/grammar.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/manifest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/metadata.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/platforms.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/spread.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/models/state.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/py.typed +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/pytest_plugin.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/remote/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/remote/errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/remote/git.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/remote/utils.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/remote/worktree.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/fetch.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/init.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/provider.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/proxy.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/remotebuild.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/request.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/state.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/testing.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/callbacks.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/cli.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/docs.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/error_formatting.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/logging.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/paths.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/platforms.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/repositories.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/retry.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/snap_config.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/string.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/system.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application/util/yaml.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application.egg-info/dependency_links.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application.egg-info/entry_points.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application.egg-info/requires.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/craft_application.egg-info/top_level.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/_static/css/custom.css +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/common/README.md +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/common/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/common/craft-application/how-to-guides/build-remotely.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/common/craft-application/how-to-guides/reuse-packages-between-builds.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/common/craft-application/reference/fetch-service.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/common/craft-application/reference/remote-builds.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/explanation/assets/app_structure.drawio +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/explanation/assets/app_structure.svg +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/explanation/build-plans.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/explanation/cryptography.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/explanation/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/explanation/structure-of-a-craft-app.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/how-to-guides/build-remotely.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/how-to-guides/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/how-to-guides/partitions.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/how-to-guides/platforms.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/redirects.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/commands/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/environment-variables.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/fetch-service.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/models/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/pytest-plugin.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/remote-builds.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/services/app.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/services/lifecycle.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reference/services/project.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/reuse/links.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/docs/tutorials/index.rst +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/__main__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/application.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/cli.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/services/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/services/package.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/services/project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/services/provider.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/partitioncraft/templates/simple/partitioncraft.yaml.j2 +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/setup.cfg +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/snap/snapcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/spread/.extension +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/spread/cloud-config.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/spread.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/__main__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/application.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/cli.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/commands/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/commands/state.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/models/metadata.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/services/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/services/package.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/testcraft/templates/simple/testcraft.yaml.j2 +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/conftest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/data/manifest/craft-manifest-expected.json +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/data/manifest/project-expected.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/data/manifest/session-manifest-expected.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/data/manifest/session-report.json +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/commands/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/commands/test_init.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/commands/test_lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/conftest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/build-secrets/secret-source-folder/source-file.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/build-secrets/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/invalid_projects/build-error/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/adoption/stderr +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/adoption/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/basic/stderr +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/basic/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/build-for-all/stderr +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/build-for-all/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/environment/stderr +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/environment/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/grammar/src/on-amd64-to-amd64/hello.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/grammar/src/on-amd64-to-arm64/hello.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/grammar/stderr +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/data/valid_projects/grammar/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/git/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/git/test_git.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/launchpad/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/launchpad/conftest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/launchpad/test_anonymous_access.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/models/invalid_testcraft/platforms-build-for.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/models/invalid_testcraft/platforms_short.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/models/test_project_schema.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/models/valid_testcraft/minimal.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/models/valid_testcraft/platforms.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/grammarcraft-full.on-amd64.for-riscv64 +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/grammarcraft-full.on-amd64.for-s390x +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/grammarcraft-full.on-riscv64.for-riscv64 +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/grammarcraft-full.on-riscv64.for-s390x +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/grammarcraft-full.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/overlaycraft-full.out +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/overlaycraft-full.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/testcraft-basic.out +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/testcraft-basic.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/testcraft-full.out +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/project_files/testcraft-full.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_fetch.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_init.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_provider.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_remotebuild.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_request.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_service_factory.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/services/test_state.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/test_application.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/integration/test_version.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/partitioncraft/init-pack/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/fetch-service-external/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/fetch-service-external/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/fetch-service-managed/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/fetch-service-managed/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/ignore-test-files/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/ignore-test-files/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/init-pack/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/inject-base/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/log-timestamps/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/log-timestamps/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/pack/bare-base/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/pack/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/pack-empty-plan/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/pack-empty-plan/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/pack-multi/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/pack-multi/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/skip-repack/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/state/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/state/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/test-cmd/spread/.extension +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/test-cmd/spread.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/test-cmd/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/test-cmd/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/test-cmd/tests/spread/my-suite/my-task/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/unset-adopt-info/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/unset-adopt-info/testcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/testcraft/version/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/grammar/for/for-platform1/hello-world-platform1.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/grammar/for/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/grammar/onto/on-amd64-to-riscv64/hello-world-riscv64.txt +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/grammar/onto/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/grammar/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/pack/bare-base/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/pack/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/pack-eol/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/pack-eol/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/plugin-groups/invalid-ubuntu@22.04/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/plugin-groups/invalid-ubuntu@24.04/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/plugin-groups/ubuntu@22.04/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/plugin-groups/ubuntu@24.04/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/project-vars/expected-metadata.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/project-vars/task.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/project-vars/witchcraft.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/commands/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/commands/test_base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/commands/test_init.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/commands/test_lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/commands/test_other.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/commands/test_remote.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/conftest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/git/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/git/test_errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/git/test_git.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/git/test_utils.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/conftest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/models/test_base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/models/test_code.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/models/test_recipe.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/test_launchpad.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/launchpad/test_util.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/project_models/basic_project.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/project_models/full_project.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/project_models/invalid_project.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_base.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_constraints.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_grammar.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_manifest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_platforms.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/models/test_spread.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/remote/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/remote/test_errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/remote/test_git.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/remote/test_utils.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/remote/test_worktree.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/conftest.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_buildplan.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_config.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_fetch.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_init.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_package.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_provider.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_proxy.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_remotebuild.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_repositories.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_request.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_service_factory.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_state.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/services/test_testing.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_app_plugins.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_errors.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_fetch.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_grammar.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_nothing.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/test_pytest_plugin.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/invalid_yaml/_README +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/invalid_yaml/duplicate_second_level.yaml-invalid +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/invalid_yaml/duplicate_top_level.yaml-invalid +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/invalid_yaml/unhashable.yaml-invalid +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_cli.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_docs.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_error_formatting.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_logging.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_paths.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_platforms.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_retry.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_snap_config.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_string.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_system.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/test_yaml.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/tests/unit/util/valid_yaml/empty.yaml +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/__main__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/application.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/cli.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/models/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/models/metadata.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/models/project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/services/__init__.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/services/lifecycle.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/services/package.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/services/project.py +0 -0
- {craft_application-6.2.0 → craft_application-6.2.2}/witchcraft/templates/simple/witchcraft.yaml.j2 +0 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# This file is part of craft-application.
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2024 Canonical Ltd.
|
|
4
|
+
#
|
|
5
|
+
# This program is free software: you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the GNU Lesser General Public License version 3, as
|
|
7
|
+
# published by the Free Software Foundation.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
10
|
+
# ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
|
|
11
|
+
# SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
|
12
|
+
# See the GNU Lesser General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
"""Configuration model for craft applications."""
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import pydantic
|
|
21
|
+
from craft_cli import EmitterMode
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ConfigModel(pydantic.BaseModel):
|
|
25
|
+
"""The configuration model for the app.
|
|
26
|
+
|
|
27
|
+
This model informs the config service what configuration items are available
|
|
28
|
+
to the application.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
verbosity_level: EmitterMode = EmitterMode.BRIEF
|
|
32
|
+
"""The verbosity level for the app."""
|
|
33
|
+
debug: bool = False
|
|
34
|
+
"""Whether the application is in debug mode."""
|
|
35
|
+
build_environment: str | None = None
|
|
36
|
+
"""The build environment to use for this app.
|
|
37
|
+
|
|
38
|
+
Defaults to unset, can also be set as ``host`` to enable destructive mode.
|
|
39
|
+
"""
|
|
40
|
+
secrets: str
|
|
41
|
+
|
|
42
|
+
platform: str | None = None
|
|
43
|
+
"""The platform for which to build."""
|
|
44
|
+
build_for: str | None = None
|
|
45
|
+
"""The target architecture for which to build."""
|
|
46
|
+
|
|
47
|
+
parallel_build_count: int
|
|
48
|
+
"""The parallel build count to send to Craft Parts.
|
|
49
|
+
|
|
50
|
+
Supersedes any value set in ``max_parallel_build_count``.
|
|
51
|
+
"""
|
|
52
|
+
max_parallel_build_count: int
|
|
53
|
+
"""The maximum parallel build count to send to Craft Parts.
|
|
54
|
+
|
|
55
|
+
If this value is set but ``parallel_build_count`` is not, the smaller of
|
|
56
|
+
``max_parallel_build_count`` or the number of processor cores available to the
|
|
57
|
+
app process is used. If unset, the number of processor cores available is used.
|
|
58
|
+
"""
|
|
59
|
+
lxd_remote: str = "local"
|
|
60
|
+
"""The LXD remote to use if using the LXD provider."""
|
|
61
|
+
launchpad_instance: str = "production"
|
|
62
|
+
"""The Launchpad instance to use for remote builds."""
|
|
63
|
+
|
|
64
|
+
idle_mins: pydantic.NonNegativeInt | None = None
|
|
65
|
+
"""How long the container used by lifecycle steps remains active after the app exits.
|
|
66
|
+
|
|
67
|
+
If unset, this defaults to exiting synchronously before the app exits.
|
|
68
|
+
"""
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '6.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (6, 2,
|
|
31
|
+
__version__ = version = '6.2.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (6, 2, 2)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g421a445'
|
|
@@ -32,6 +32,7 @@ from typing import TYPE_CHECKING, Annotated, Any, Literal, cast, final
|
|
|
32
32
|
|
|
33
33
|
import annotated_types
|
|
34
34
|
import craft_cli
|
|
35
|
+
import craft_platforms
|
|
35
36
|
import craft_providers
|
|
36
37
|
from platformdirs import user_cache_path
|
|
37
38
|
|
|
@@ -573,7 +574,8 @@ class Application:
|
|
|
573
574
|
|
|
574
575
|
def _register_default_plugins(self) -> None:
|
|
575
576
|
"""Register per application plugins when initializing."""
|
|
576
|
-
|
|
577
|
+
with warnings.catch_warnings():
|
|
578
|
+
self.register_plugins(self._get_app_plugins())
|
|
577
579
|
|
|
578
580
|
def _pre_run(self, dispatcher: craft_cli.Dispatcher) -> None:
|
|
579
581
|
"""Do any final setup before running the command.
|
|
@@ -775,7 +777,30 @@ class Application:
|
|
|
775
777
|
def _enable_craft_parts_features(self) -> None:
|
|
776
778
|
"""Enable any specific craft-parts Feature that the application will need."""
|
|
777
779
|
|
|
780
|
+
@final
|
|
781
|
+
def _set_plugin_group(self) -> None:
|
|
782
|
+
"""Set the plugin group from the lifecycle service.
|
|
783
|
+
|
|
784
|
+
If no plugin group is provided or an error occurs while determining
|
|
785
|
+
the build info, no plugin group is registered.
|
|
786
|
+
"""
|
|
787
|
+
try:
|
|
788
|
+
build_plan = self.services.get("build_plan").plan()
|
|
789
|
+
except (craft_cli.CraftError, craft_platforms.CraftPlatformsError):
|
|
790
|
+
# We can do this here because when we start the lifecycle
|
|
791
|
+
# we actually exit the app if there's an error.
|
|
792
|
+
craft_cli.emit.debug("No plugin group registered due to error.")
|
|
793
|
+
return
|
|
794
|
+
group = self.services.get_class("lifecycle").get_plugin_group(build_plan[0])
|
|
795
|
+
|
|
796
|
+
# We don't need to import this unless we have a group to set.
|
|
797
|
+
from craft_parts.plugins import set_plugin_group # noqa: PLC0415
|
|
798
|
+
|
|
799
|
+
if group:
|
|
800
|
+
set_plugin_group(group)
|
|
801
|
+
|
|
778
802
|
def _initialize_craft_parts(self) -> None:
|
|
779
803
|
"""Perform craft-parts-specific initialization, like features and plugins."""
|
|
780
804
|
self._enable_craft_parts_features()
|
|
781
805
|
self._register_default_plugins()
|
|
806
|
+
self._set_plugin_group()
|
|
@@ -95,7 +95,7 @@ class BuildPlanService(base.AppService):
|
|
|
95
95
|
"""Filter the build plan.
|
|
96
96
|
|
|
97
97
|
This method filters the given build plan based on the provided filter values.
|
|
98
|
-
An application may override this if
|
|
98
|
+
An application may override this if it needs to filter the build plan in
|
|
99
99
|
non-default ways. It exists to allow applications to only change the build plan
|
|
100
100
|
filter and should only be used by :meth:`get_build_plan` except in testing.
|
|
101
101
|
|
|
@@ -42,9 +42,10 @@ T = TypeVar("T")
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class ConfigHandler(abc.ABC):
|
|
45
|
-
"""
|
|
45
|
+
"""The abstract class that is the parent of all configuration handlers."""
|
|
46
46
|
|
|
47
47
|
def __init__(self, app: application.AppMetadata) -> None:
|
|
48
|
+
"""Create the configuration handler with the relevant application metadata."""
|
|
48
49
|
self._app = app
|
|
49
50
|
|
|
50
51
|
@abc.abstractmethod
|
|
@@ -59,7 +60,11 @@ class ConfigHandler(abc.ABC):
|
|
|
59
60
|
|
|
60
61
|
@final
|
|
61
62
|
class AppEnvironmentHandler(ConfigHandler):
|
|
62
|
-
"""Configuration handler to get values from app-specific environment variables.
|
|
63
|
+
"""Configuration handler to get values from app-specific environment variables.
|
|
64
|
+
|
|
65
|
+
Environment variables used for this are prefixed with a fully upper-case form
|
|
66
|
+
of the application name. For example, ``TESTCRAFT_DEBUG``.
|
|
67
|
+
"""
|
|
63
68
|
|
|
64
69
|
def __init__(self, app: application.AppMetadata) -> None:
|
|
65
70
|
super().__init__(app)
|
|
@@ -89,7 +94,12 @@ class CraftEnvironmentHandler(ConfigHandler):
|
|
|
89
94
|
|
|
90
95
|
|
|
91
96
|
class SnapConfigHandler(ConfigHandler):
|
|
92
|
-
"""Configuration handler that gets values from
|
|
97
|
+
"""Configuration handler that gets values from snapd.
|
|
98
|
+
|
|
99
|
+
Snap configuration values are set with kebab case, so the ``verbosity_level``
|
|
100
|
+
configuration value can be set to ``verbose`` using the command
|
|
101
|
+
``snap set <snap-name> verbosity-level=verbose``
|
|
102
|
+
"""
|
|
93
103
|
|
|
94
104
|
def __init__(self, app: application.AppMetadata) -> None:
|
|
95
105
|
super().__init__(app)
|
|
@@ -32,7 +32,7 @@ if TYPE_CHECKING: # pragma: no cover
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class PackageService(base.AppService):
|
|
35
|
-
"""
|
|
35
|
+
"""The business logic for creating packages."""
|
|
36
36
|
|
|
37
37
|
def __init__(self, app: AppMetadata, services: ServiceFactory) -> None:
|
|
38
38
|
super().__init__(app, services)
|
|
@@ -40,11 +40,14 @@ class PackageService(base.AppService):
|
|
|
40
40
|
|
|
41
41
|
@abc.abstractmethod
|
|
42
42
|
def pack(self, prime_dir: pathlib.Path, dest: pathlib.Path) -> list[pathlib.Path]:
|
|
43
|
-
"""Create one or more packages
|
|
43
|
+
"""Create one or more packages.
|
|
44
44
|
|
|
45
|
-
:param prime_dir: Directory path to the prime directory.
|
|
45
|
+
:param prime_dir: Directory path to the default prime directory.
|
|
46
|
+
**DEPRECATED** in favour of retrieving this information from the
|
|
47
|
+
:attr:`LifecycleService
|
|
48
|
+
<craft_application.services.lifecycle.LifecycleService.project_info>`.
|
|
46
49
|
:param dest: Directory into which to write the package(s).
|
|
47
|
-
:returns: A list of paths to created packages.
|
|
50
|
+
:returns: A list of paths to the created packages.
|
|
48
51
|
"""
|
|
49
52
|
|
|
50
53
|
# This was implemented as a separate property to allow applications to
|
{craft_application-6.2.0 → craft_application-6.2.2}/craft_application/services/service_factory.py
RENAMED
|
@@ -183,7 +183,7 @@ class ServiceFactory:
|
|
|
183
183
|
|
|
184
184
|
This works like ``dict.update()``, overwriting already-set values.
|
|
185
185
|
|
|
186
|
-
:param service: the name of the service
|
|
186
|
+
:param service: the name of the service. For example, "lifecycle".
|
|
187
187
|
:param kwargs: keyword arguments to set.
|
|
188
188
|
"""
|
|
189
189
|
self._service_kwargs.setdefault(service, {}).update(kwargs)
|
|
@@ -304,11 +304,11 @@ class ServiceFactory:
|
|
|
304
304
|
def get(self, service: str) -> services.AppService:
|
|
305
305
|
"""Get a service by name.
|
|
306
306
|
|
|
307
|
-
:param service: the name of the service (e.g. "config")
|
|
308
|
-
:returns: An instantiated and set up service class.
|
|
309
|
-
|
|
310
307
|
Also caches the service so as to provide a single service instance per
|
|
311
|
-
ServiceFactory
|
|
308
|
+
``ServiceFactory``.
|
|
309
|
+
|
|
310
|
+
:param service: the name of the service. For example, "config".
|
|
311
|
+
:returns: An instantiated and setup service class.
|
|
312
312
|
"""
|
|
313
313
|
if service in self._services:
|
|
314
314
|
return self._services[service]
|
|
@@ -121,6 +121,7 @@ docs/common/craft-application/how-to-guides/build-remotely.rst
|
|
|
121
121
|
docs/common/craft-application/how-to-guides/reuse-packages-between-builds.rst
|
|
122
122
|
docs/common/craft-application/reference/fetch-service.rst
|
|
123
123
|
docs/common/craft-application/reference/remote-builds.rst
|
|
124
|
+
docs/common/craft-application/reference/strict-platform-names.rst
|
|
124
125
|
docs/explanation/build-plans.rst
|
|
125
126
|
docs/explanation/cryptography.rst
|
|
126
127
|
docs/explanation/index.rst
|
|
@@ -143,8 +144,11 @@ docs/reference/models/index.rst
|
|
|
143
144
|
docs/reference/models/platforms.rst
|
|
144
145
|
docs/reference/models/project.rst
|
|
145
146
|
docs/reference/services/app.rst
|
|
147
|
+
docs/reference/services/buildplan.rst
|
|
148
|
+
docs/reference/services/config.rst
|
|
146
149
|
docs/reference/services/index.rst
|
|
147
150
|
docs/reference/services/lifecycle.rst
|
|
151
|
+
docs/reference/services/package.rst
|
|
148
152
|
docs/reference/services/project.rst
|
|
149
153
|
docs/reuse/links.txt
|
|
150
154
|
docs/tutorials/index.rst
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.. _reference-strict-platform-names:
|
|
2
|
+
|
|
3
|
+
Naming rules
|
|
4
|
+
------------
|
|
5
|
+
|
|
6
|
+
A platform's name typically matches its target architecture. However, names can deviate
|
|
7
|
+
from this norm if they satisfy the following rules:
|
|
8
|
+
|
|
9
|
+
* A platform name must be at least one character in length.
|
|
10
|
+
* A platform name must begin and end with a letter, a number, or a Unicode character
|
|
11
|
+
classified as "Symbol, other".
|
|
12
|
+
|
|
13
|
+
- In addition to those categories, characters other than the beginning and end of a
|
|
14
|
+
platform name may contain a hyphen (``-``), an at sign (``@``), a full stop (``.``),
|
|
15
|
+
or a colon (``:``).
|
|
16
|
+
* The platform name ``any`` is reserved and cannot be used.
|
|
17
|
+
|
|
18
|
+
|Starcraft| uses platform names as part of the file name when packing a |star|. A few valid
|
|
19
|
+
but unusual platform names include:
|
|
20
|
+
|
|
21
|
+
- ``amd64``
|
|
22
|
+
- ``my-platform``
|
|
23
|
+
- ``🇧🇷❣️``
|
|
@@ -51,6 +51,7 @@ exclude_patterns = [
|
|
|
51
51
|
"common/craft-application/how-to-guides/reuse-packages-between-builds.rst",
|
|
52
52
|
"common/craft-application/reference/remote-builds.rst",
|
|
53
53
|
"common/craft-application/reference/fetch-service.rst",
|
|
54
|
+
"common/craft-application/reference/strict-platform-names.rst",
|
|
54
55
|
# There's no tutorials right now, so just hide the scaffolding
|
|
55
56
|
"tutorials",
|
|
56
57
|
]
|
|
@@ -89,10 +90,6 @@ html_css_files = [
|
|
|
89
90
|
# Intersphinx extension
|
|
90
91
|
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
|
|
91
92
|
|
|
92
|
-
intersphinx_mapping = {
|
|
93
|
-
"python": ("https://docs.python.org/3", None),
|
|
94
|
-
}
|
|
95
|
-
|
|
96
93
|
# Type hints configuration
|
|
97
94
|
set_type_checking_flag = True
|
|
98
95
|
typehints_fully_qualified = False
|
|
@@ -103,6 +100,7 @@ github_username = "canonical"
|
|
|
103
100
|
github_repository = "craft-application"
|
|
104
101
|
|
|
105
102
|
intersphinx_mapping = {
|
|
103
|
+
"python": ("https://docs.python.org/3", None),
|
|
106
104
|
"craft-cli": (
|
|
107
105
|
"https://canonical-craft-cli.readthedocs-hosted.com/en/latest",
|
|
108
106
|
None,
|
|
@@ -15,6 +15,35 @@ Changelog
|
|
|
15
15
|
|
|
16
16
|
For a complete list of commits, check out the `1.2.3`_ release on GitHub.
|
|
17
17
|
|
|
18
|
+
6.2.2 (2026-03-12)
|
|
19
|
+
------------------
|
|
20
|
+
|
|
21
|
+
Documentation
|
|
22
|
+
=============
|
|
23
|
+
|
|
24
|
+
- Fix a misspelling.
|
|
25
|
+
|
|
26
|
+
For a complete list of commits, check out the `6.2.2`_ release on GitHub.
|
|
27
|
+
|
|
28
|
+
6.2.1 (2026-03-06)
|
|
29
|
+
------------------
|
|
30
|
+
|
|
31
|
+
Bug fixes
|
|
32
|
+
=========
|
|
33
|
+
|
|
34
|
+
- The :py:class:`~craft_application.Application` now sets the plugin group on
|
|
35
|
+
application load.
|
|
36
|
+
|
|
37
|
+
Documentation
|
|
38
|
+
=============
|
|
39
|
+
|
|
40
|
+
- Add a :ref:`reference-BuildPlanService` reference document.
|
|
41
|
+
- Add a :ref:`reference-ConfigService` reference document.
|
|
42
|
+
- Add a :ref:`reference-PackageService` reference document.
|
|
43
|
+
- Add a snippet for :ref:`platform naming rules <reference-strict-platform-names>`
|
|
44
|
+
that can be reused across applications.
|
|
45
|
+
|
|
46
|
+
For a complete list of commits, check out the `6.2.1`_ release on GitHub.
|
|
18
47
|
|
|
19
48
|
6.2.0 (2026-02-12)
|
|
20
49
|
------------------
|
|
@@ -1210,3 +1239,5 @@ For a complete list of commits, check out the `2.7.0`_ release on GitHub.
|
|
|
1210
1239
|
.. _6.1.0: https://github.com/canonical/craft-application/releases/tag/6.1.0
|
|
1211
1240
|
.. _6.1.1: https://github.com/canonical/craft-application/releases/tag/6.1.1
|
|
1212
1241
|
.. _6.2.0: https://github.com/canonical/craft-application/releases/tag/6.2.0
|
|
1242
|
+
.. _6.2.1: https://github.com/canonical/craft-application/releases/tag/6.2.1
|
|
1243
|
+
.. _6.2.2: https://github.com/canonical/craft-application/releases/tag/6.2.2
|
|
@@ -28,6 +28,11 @@ The following mockup shows all the valid ways to create platform entries:
|
|
|
28
28
|
build-on: [<arch 1>, <arch 2>]
|
|
29
29
|
build-for: <arch 2>
|
|
30
30
|
|
|
31
|
+
.. |star| replace:: package
|
|
32
|
+
.. |Starcraft| replace:: Craft Application
|
|
33
|
+
|
|
34
|
+
.. include:: /common/craft-application/reference/strict-platform-names.rst
|
|
35
|
+
|
|
31
36
|
.. _platform-schema:
|
|
32
37
|
|
|
33
38
|
``Platform`` schema
|
|
@@ -40,6 +40,11 @@ This key determines the project's build environment.
|
|
|
40
40
|
.. kitbash-field:: Project platforms
|
|
41
41
|
:override-type: dict[str, Platform]
|
|
42
42
|
|
|
43
|
+
If the application has enabled strict platform naming (the default when using the
|
|
44
|
+
base ``ubuntu@25.10`` or newer), platform names must follow
|
|
45
|
+
:ref:`a set of rules <reference-strict-platform-names>` that limit what can
|
|
46
|
+
be used in a platform name.
|
|
47
|
+
|
|
43
48
|
.. kitbash-field:: Project contact
|
|
44
49
|
:override-type: str | list[str]
|
|
45
50
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.. meta::
|
|
2
|
+
:description: API reference for the BuildPlanService. In a craft application, the BuildPlanService creates build plans for a project.
|
|
3
|
+
|
|
4
|
+
.. py:currentmodule:: craft_application.services.buildplan
|
|
5
|
+
|
|
6
|
+
.. _reference-BuildPlanService:
|
|
7
|
+
|
|
8
|
+
``BuildPlanService``
|
|
9
|
+
====================
|
|
10
|
+
|
|
11
|
+
The ``BuildPlanService`` uses :external+craft-platforms:doc:`index` to create
|
|
12
|
+
:doc:`build plans </explanation/build-plans>`.
|
|
13
|
+
Apps that need to generate custom build plans that Craft Platforms can't handle must
|
|
14
|
+
override :py:meth:`~BuildPlanService._gen_exhaustive_build_plan`.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
API documentation
|
|
18
|
+
-----------------
|
|
19
|
+
|
|
20
|
+
.. autoclass:: BuildPlanService
|
|
21
|
+
:member-order: bysource
|
|
22
|
+
:members:
|
|
23
|
+
:private-members: _gen_exhaustive_build_plan,_filter_plan
|
|
24
|
+
:undoc-members:
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.. meta::
|
|
2
|
+
:description: API reference for the ConfigService. In a craft app, the ConfigService provides access to the configuration.
|
|
3
|
+
|
|
4
|
+
.. py:currentmodule:: craft_application.services.config
|
|
5
|
+
|
|
6
|
+
.. _reference-ConfigService:
|
|
7
|
+
|
|
8
|
+
``ConfigService``
|
|
9
|
+
=================
|
|
10
|
+
|
|
11
|
+
The ``ConfigService`` provides read access to a user's application configuration
|
|
12
|
+
through a series of :class:`ConfigHandler` objects. The default config handlers provide
|
|
13
|
+
access to both per-application configuration and configuration for all crafts. An
|
|
14
|
+
application can provide additional config handlers for custom use cases.
|
|
15
|
+
|
|
16
|
+
The configuration items available to the configuration service are defined in the
|
|
17
|
+
:class:`~craft_application._config.ConfigModel`, which an application can extend.
|
|
18
|
+
|
|
19
|
+
Handler Order
|
|
20
|
+
-------------
|
|
21
|
+
|
|
22
|
+
The application's configuration is retrieved from the handlers in the order in which
|
|
23
|
+
they were registered to the config cervice. By default this order is:
|
|
24
|
+
|
|
25
|
+
1. :py:class:`AppEnvironmentHandler` gets app-specific environment variables.
|
|
26
|
+
2. :py:class:`CraftEnvironmentHandler` gets general ``CRAFT_*`` environment variables.
|
|
27
|
+
3. Extra handlers (if any) provided by the application.
|
|
28
|
+
4. :py:class:`SnapConfigHandler` (if running as a snap) gets a `snap configuration option`_.
|
|
29
|
+
5. :py:class:`DefaultConfigHandler` gets the default value, if there is one.
|
|
30
|
+
|
|
31
|
+
A handler raises a :external+python:class:`KeyError` if it doesn't have a relevant
|
|
32
|
+
config option set. If no handlers return a value when getting a configuration option, a
|
|
33
|
+
:external+python:class:`KeyError` is raised to signify that no configuration could be
|
|
34
|
+
found.
|
|
35
|
+
|
|
36
|
+
Configuration model
|
|
37
|
+
-------------------
|
|
38
|
+
|
|
39
|
+
Each application has a configuration model, by default ``craft_application.ConfigModel``,
|
|
40
|
+
which is provided to the application by the ``ConfigModel`` attribute of the app's :attr:`~craft_application.AppMetadata` instance. An app may extend its fields from those
|
|
41
|
+
in the configuration model.
|
|
42
|
+
|
|
43
|
+
.. autoclass:: craft_application.ConfigModel
|
|
44
|
+
:members:
|
|
45
|
+
:exclude-members: model_config
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
API documentation
|
|
49
|
+
-----------------
|
|
50
|
+
|
|
51
|
+
.. autoclass:: ConfigHandler
|
|
52
|
+
:members:
|
|
53
|
+
|
|
54
|
+
.. autoclass:: AppEnvironmentHandler
|
|
55
|
+
:members:
|
|
56
|
+
|
|
57
|
+
.. autoclass:: CraftEnvironmentHandler
|
|
58
|
+
:members:
|
|
59
|
+
|
|
60
|
+
.. autoclass:: SnapConfigHandler
|
|
61
|
+
:members:
|
|
62
|
+
|
|
63
|
+
.. autoclass:: DefaultConfigHandler
|
|
64
|
+
:members:
|
|
65
|
+
|
|
66
|
+
.. autoclass:: ConfigService
|
|
67
|
+
:member-order: bysource
|
|
68
|
+
:members:
|
|
69
|
+
:private-members:
|
|
70
|
+
|
|
71
|
+
.. _`snap configuration option`: https://snapcraft.io/docs/configuration-in-snaps
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.. meta::
|
|
2
|
+
:description: API reference for services. In a craft application, each service is responsible for a different category of tasks.
|
|
3
|
+
|
|
4
|
+
.. _reference-services:
|
|
5
|
+
|
|
6
|
+
Services
|
|
7
|
+
========
|
|
8
|
+
|
|
9
|
+
These pages provide reference information for services provided by Craft Application.
|
|
10
|
+
|
|
11
|
+
Service factory API documentation
|
|
12
|
+
---------------------------------
|
|
13
|
+
|
|
14
|
+
.. autoclass:: craft_application.services.ServiceFactory
|
|
15
|
+
:members: register,reset,update_kwargs,get_class,get
|
|
16
|
+
:member-order: bysource
|
|
17
|
+
:exclude-members: __new__
|
|
18
|
+
|
|
19
|
+
.. toctree::
|
|
20
|
+
:maxdepth: 1
|
|
21
|
+
:hidden:
|
|
22
|
+
|
|
23
|
+
app
|
|
24
|
+
buildplan
|
|
25
|
+
config
|
|
26
|
+
lifecycle
|
|
27
|
+
package
|
|
28
|
+
project
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.. meta::
|
|
2
|
+
:description: API reference for the PackageService. In a craft app, the PackageService turns one or more directories into software packages.
|
|
3
|
+
|
|
4
|
+
.. py:currentmodule:: craft_application.services.package
|
|
5
|
+
|
|
6
|
+
.. _reference-PackageService:
|
|
7
|
+
|
|
8
|
+
``PackageService``
|
|
9
|
+
==================
|
|
10
|
+
|
|
11
|
+
The ``PackageService`` takes the final output of the :external+craft-parts:ref:`prime step <craft_parts_steps>`
|
|
12
|
+
and assembles it into the final package. Because this step is unique to the app,
|
|
13
|
+
the :meth:`~PackageService.pack` and :meth:`~PackageService.metadata` methods are abstract
|
|
14
|
+
and must be implemented by the app.
|
|
15
|
+
|
|
16
|
+
API documentation
|
|
17
|
+
-----------------
|
|
18
|
+
|
|
19
|
+
.. autoclass:: PackageService
|
|
20
|
+
:member-order: bysource
|
|
21
|
+
:members:
|
{craft_application-6.2.0 → craft_application-6.2.2}/tests/spread/witchcraft/plugin-groups/task.yaml
RENAMED
|
@@ -16,7 +16,7 @@ execute: |
|
|
|
16
16
|
|
|
17
17
|
# Check that the package referencing a plugin not used on this system does not pack.
|
|
18
18
|
cd "invalid-${DISTRO}"
|
|
19
|
-
witchcraft pack --destructive-mode |& MATCH "
|
|
19
|
+
witchcraft pack --destructive-mode |& MATCH "plugin not registered: '[a-z]+' \(in field 'parts.part1',"
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
restore: |
|
|
@@ -1027,6 +1027,64 @@ def test_register_plugins_default(mocker, app_metadata, fake_services):
|
|
|
1027
1027
|
assert reg.call_count == 0
|
|
1028
1028
|
|
|
1029
1029
|
|
|
1030
|
+
def test_set_plugin_group(mocker, app_metadata, fake_services):
|
|
1031
|
+
"""Test that we set the plugin group early."""
|
|
1032
|
+
mock_set = mocker.patch("craft_parts.plugins.set_plugin_group")
|
|
1033
|
+
mock_get_plugin_group = mocker.patch.object(
|
|
1034
|
+
fake_services.get_class("lifecycle"), "get_plugin_group"
|
|
1035
|
+
)
|
|
1036
|
+
|
|
1037
|
+
app = FakeApplication(app_metadata, fake_services)
|
|
1038
|
+
with pytest.raises(SystemExit):
|
|
1039
|
+
app.run()
|
|
1040
|
+
|
|
1041
|
+
mock_set.assert_called_once_with(mock_get_plugin_group.return_value)
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
def test_set_plugin_group_empty(mocker, app_metadata, fake_services):
|
|
1045
|
+
"""Test that we set the plugin group early."""
|
|
1046
|
+
mock_set = mocker.patch("craft_parts.plugins.set_plugin_group")
|
|
1047
|
+
mock_get_plugin_group = mocker.patch.object(
|
|
1048
|
+
fake_services.get_class("lifecycle"), "get_plugin_group", return_value=None
|
|
1049
|
+
)
|
|
1050
|
+
|
|
1051
|
+
app = FakeApplication(app_metadata, fake_services)
|
|
1052
|
+
with pytest.raises(SystemExit):
|
|
1053
|
+
app.run()
|
|
1054
|
+
|
|
1055
|
+
mock_get_plugin_group.assert_called_once()
|
|
1056
|
+
mock_set.assert_not_called()
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
@pytest.mark.parametrize(
|
|
1060
|
+
"planning_error",
|
|
1061
|
+
[
|
|
1062
|
+
craft_cli.CraftError("General craft error"),
|
|
1063
|
+
craft_platforms.CraftPlatformsError("Platforms error"),
|
|
1064
|
+
craft_application.errors.CraftValidationError("Validation!"),
|
|
1065
|
+
],
|
|
1066
|
+
)
|
|
1067
|
+
def test_set_plugin_group_ignores_errors(
|
|
1068
|
+
mocker, app_metadata, fake_services, planning_error
|
|
1069
|
+
):
|
|
1070
|
+
"""Test that we set the plugin group early."""
|
|
1071
|
+
mock_set = mocker.patch("craft_parts.plugins.set_plugin_group")
|
|
1072
|
+
mock_get_plugin_group = mocker.patch.object(
|
|
1073
|
+
fake_services.get_class("lifecycle"), "get_plugin_group", return_value=None
|
|
1074
|
+
)
|
|
1075
|
+
mock_planner = mocker.patch.object(
|
|
1076
|
+
fake_services.get("build_plan"), "plan", side_effect=planning_error
|
|
1077
|
+
)
|
|
1078
|
+
|
|
1079
|
+
app = FakeApplication(app_metadata, fake_services)
|
|
1080
|
+
with pytest.raises(SystemExit):
|
|
1081
|
+
app.run()
|
|
1082
|
+
|
|
1083
|
+
mock_planner.assert_called_once()
|
|
1084
|
+
mock_get_plugin_group.assert_not_called()
|
|
1085
|
+
mock_set.assert_not_called()
|
|
1086
|
+
|
|
1087
|
+
|
|
1030
1088
|
@pytest.fixture
|
|
1031
1089
|
def grammar_project_mini(tmp_path):
|
|
1032
1090
|
"""A project that builds on amd64 to riscv64 and s390x."""
|