Skip to content

Commit

Permalink
build(deps): bump craft-parts to 2.1.0
Browse files Browse the repository at this point in the history
craft-parts 2.1.0 adds a Poetry plugin. This plugin disabled until
the integration work in #5025 is completed.

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
  • Loading branch information
mr-cal committed Sep 10, 2024
1 parent bfe53b5 commit 63f12fb
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"common/craft-parts/reference/parts_steps.rst",
"common/craft-parts/reference/step_execution_environment.rst",
"common/craft-parts/reference/step_output_directories.rst",
"common/craft-parts/reference/plugins/poetry_plugin.rst",
"common/craft-parts/reference/plugins/python_plugin.rst",
"common/craft-parts/reference/plugins/maven_plugin.rst",
# Extra non-craft-parts exclusions can be added after this comment
Expand Down
2 changes: 1 addition & 1 deletion requirements-devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ craft-application==4.1.2
craft-archives==2.0.0
craft-cli==2.7.0
craft-grammar==2.0.0
craft-parts==2.0.0
craft-parts==2.1.0
craft-platforms==0.1.1
craft-providers==2.0.1
craft-store==3.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ craft-application==4.1.2
craft-archives==2.0.0
craft-cli==2.7.0
craft-grammar==2.0.0
craft-parts==2.0.0
craft-parts==2.1.0
craft-platforms==0.1.1
craft-providers==2.0.1
craft-store==3.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ craft-application==4.1.2
craft-archives==2.0.0
craft-cli==2.7.0
craft-grammar==2.0.0
craft-parts==2.0.0
craft-parts==2.1.0
craft-platforms==0.1.1
craft-providers==2.0.1
craft-store==3.0.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def recursive_data_files(directory, install_directory):
"craft-archives~=2.0",
"craft-cli~=2.6",
"craft-grammar~=2.0",
"craft-parts~=2.0",
"craft-parts~=2.1",
"craft-platforms~=0.1",
"craft-providers~=2.0",
"craft-store~=3.0",
Expand Down
3 changes: 3 additions & 0 deletions snapcraft/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ def _register_default_plugins(self) -> None:
"""Register per application plugins when initializing."""
super()._register_default_plugins()

# poetry plugin needs integration work, see #5025
craft_parts.plugins.unregister("poetry")

if self._known_core24:
# dotnet is disabled for core24 and newer because it is pending a rewrite
craft_parts.plugins.unregister("dotnet")
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/parts/plugins/test_python_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_get_build_commands(plugin, new_dir):
eval "${{opts_state}}"
"""
),
'ln -sf "${symlink_target}" "${PARTS_PYTHON_VENV_INTERP_PATH}"\n',
'ln -sf "${symlink_target}" "${PARTS_PYTHON_VENV_INTERP_PATH}"',
]


Expand Down
11 changes: 11 additions & 0 deletions tests/unit/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,17 @@ def test_application_dotnet_not_registered(base, build_base, snapcraft_yaml):
assert "dotnet" not in craft_parts.plugins.get_registered_plugins()


@pytest.mark.parametrize("base", const.CURRENT_BASES)
def test_application_poetry_not_registered(base, snapcraft_yaml):
"""poetry plugin is disabled for all bases."""
snapcraft_yaml(base=base)
app = application.create_app()

app._register_default_plugins()

assert "poetry" not in craft_parts.plugins.get_registered_plugins()


def test_default_command_integrated(monkeypatch, mocker, new_dir):
"""Test that for core24 projects we accept "pack" as the default command."""

Expand Down

0 comments on commit 63f12fb

Please sign in to comment.