python3Packages.craft-application: 5.4.0 -> 5.5.0 (#427404)

authored by Pol Dellaiera and committed by GitHub f0569829 b555fc31

+52 -16
+5
pkgs/by-name/ro/rockcraft/package.nix
··· 60 60 "test_run_init_django" 61 61 # Mock is broken for Unix FHS reasons. 62 62 "test_run_pack_services" 63 + # Later version of craft-application is being used, which adds an 64 + # additional kind of file to be ignored, and invalidates a somewhat 65 + # static assertion. Can be removed in a later version once rockcraft 66 + # catches up with craft-application version. 67 + "test_lifecycle_args" 63 68 ]; 64 69 65 70 versionCheckProgramArg = "--version";
+14
pkgs/by-name/sn/snapcraft/esm-test.patch
··· 1 + diff --git i/tests/unit/test_application.py w/tests/unit/test_application.py 2 + index d5da2454c..2a9bcd6f9 100644 3 + --- i/tests/unit/test_application.py 4 + +++ w/tests/unit/test_application.py 5 + @@ -391,7 +391,8 @@ def test_esm_error(snapcraft_yaml, base, monkeypatch, capsys): 6 + _, err = capsys.readouterr() 7 + 8 + assert re.match( 9 + - rf"^Base {base!r} is not supported by this version of Snapcraft.\n" 10 + + rf"^Running snapcraft without a command will not be possible in future releases. Use 'snapcraft pack' instead.\n" 11 + + rf"Base {base!r} is not supported by this version of Snapcraft.\n" 12 + rf"Recommended resolution: Use Snapcraft .* from the '.*' channel of snapcraft where {base!r} was last supported.\n" 13 + r"For more information, check out: .*/reference/bases\n", 14 + err,
+6
pkgs/by-name/sn/snapcraft/package.nix
··· 26 26 }; 27 27 28 28 patches = [ 29 + # We're using a later version of `craft-cli` than expected, which 30 + # adds an extra deprecation warning to the CLI output, meaning that 31 + # an expected error message looks slightly different. This patch corrects 32 + # that by checking for the updated error message and can be dropped in a 33 + # later release of snapcraft. 34 + ./esm-test.patch 29 35 # Snapcraft is only officially distributed as a snap, as is LXD. The socket 30 36 # path for LXD must be adjusted so that it's at the correct location for LXD 31 37 # on NixOS. This patch will likely never be accepted upstream.
+9 -3
pkgs/development/python-modules/craft-application/default.nix
··· 31 31 32 32 buildPythonPackage rec { 33 33 pname = "craft-application"; 34 - version = "5.4.0"; 34 + version = "5.5.0"; 35 35 pyproject = true; 36 36 37 37 src = fetchFromGitHub { 38 38 owner = "canonical"; 39 39 repo = "craft-application"; 40 40 tag = version; 41 - hash = "sha256-xWGcKJY5ov6SN8CCRK33rVDsDcvKtEnv7Zy9VBLJYYc="; 41 + hash = "sha256-eNca9+CBAGTQe6URMUYRaJR7TXFJA+dWcYIJdKyB3bw="; 42 42 }; 43 43 44 44 postPatch = '' 45 45 substituteInPlace pyproject.toml \ 46 - --replace-fail "setuptools==75.8.0" "setuptools" 46 + --replace-fail "setuptools==75.9.1" "setuptools" 47 47 48 48 substituteInPlace craft_application/git/_utils.py \ 49 49 --replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs" ··· 98 98 # derivation. Once charmcraft has moved to craft-application >= 5, `--replace-fail` can be added. 99 99 substituteInPlace tests/conftest.py \ 100 100 --replace "include_lsb=False, include_uname=False, include_oslevel=False" "include_lsb=False, include_uname=False, include_oslevel=False, os_release_file='$HOME/os-release'" 101 + 102 + # The project attempts to write into the user's runtime directory, usually 103 + # '/run/user/<uid>', which fails in the build environment. By setting this 104 + # variable, we redirect the runtime directory lookup to the temp directory 105 + # created by the 'writableTmpDirAsHomeHook'. 106 + export XDG_RUNTIME_DIR="$HOME" 101 107 ''; 102 108 103 109 pythonImportsCheck = [ "craft_application" ];
+2 -2
pkgs/development/python-modules/craft-cli/default.nix
··· 16 16 17 17 buildPythonPackage rec { 18 18 pname = "craft-cli"; 19 - version = "3.0.0"; 19 + version = "3.1.2"; 20 20 21 21 pyproject = true; 22 22 ··· 24 24 owner = "canonical"; 25 25 repo = "craft-cli"; 26 26 tag = version; 27 - hash = "sha256-RAnvx5519iXZnJm8jtY635e0DEL7jnIgZtTCindqMTY="; 27 + hash = "sha256-ryNHl/c8Pg2mGQHE9Dbd0bLU80NyCyxfhd2YQGEBN40="; 28 28 }; 29 29 30 30 postPatch = ''
+3 -3
pkgs/development/python-modules/craft-providers/default.nix
··· 21 21 22 22 buildPythonPackage rec { 23 23 pname = "craft-providers"; 24 - version = "2.3.1"; 24 + version = "2.4.0"; 25 25 26 26 pyproject = true; 27 27 ··· 29 29 owner = "canonical"; 30 30 repo = "craft-providers"; 31 31 tag = version; 32 - hash = "sha256-MeQOqw0F4OwaooHHrUh3qITTOFNXG1Qg1oJcYxRQTz0="; 32 + hash = "sha256-frcRv+19czsZ948SEKfYsMUP6n9MbJv6gxXUAdwFw4Y="; 33 33 }; 34 34 35 35 patches = [ ··· 51 51 # The urllib3 incompat: https://github.com/msabramo/requests-unixsocket/pull/69 52 52 # This is already patched in nixpkgs. 53 53 substituteInPlace pyproject.toml \ 54 - --replace-fail "setuptools==75.2.0" "setuptools" 54 + --replace-fail "setuptools==75.9.1" "setuptools" 55 55 ''; 56 56 57 57 pythonRelaxDeps = [ "requests" ];
+13 -8
pkgs/development/python-modules/craft-providers/inject-snaps.patch
··· 1 - diff --git a/craft_providers/base.py b/craft_providers/base.py 2 - index 3c914a2..d9c2cf9 100644 3 - --- a/craft_providers/base.py 4 - +++ b/craft_providers/base.py 5 - @@ -655,37 +655,22 @@ class Base(ABC): 1 + diff --git i/craft_providers/base.py w/craft_providers/base.py 2 + index 00f56ec..302f359 100644 3 + --- i/craft_providers/base.py 4 + +++ w/craft_providers/base.py 5 + @@ -655,40 +655,24 @@ class Base(ABC): 6 6 ), 7 7 ) 8 8 ··· 21 21 - f" channel {snap.channel!r} in target environment." 22 22 - ), 23 23 - details=error.details, 24 + - resolution=( 25 + - "Check Snap store status at https://status.snapcraft.io" 26 + - ), 24 27 - ) from error 25 28 - else: 26 29 - try: ··· 38 41 - details=error.details, 39 42 - ) from error 40 43 + try: 41 - + channel = "latest/beta" 42 44 + snap_installer.install_from_store( 43 45 + executor=executor, 44 46 + snap_name=snap.name, 45 - + channel=channel, 47 + + channel=snap.channel, 46 48 + classic=snap.classic, 47 49 + ) 48 50 + except SnapInstallationError as error: 49 51 + raise BaseConfigurationError( 50 52 + brief=( 51 53 + f"failed to install snap {snap.name!r} from store" 52 - + f" channel {channel!r} in target environment." 54 + + f" channel {snap.channel!r} in target environment." 53 55 + ), 54 56 + details=error.details, 57 + + resolution=( 58 + + "Check Snap store status at https://status.snapcraft.io" 59 + + ), 55 60 + ) from error 56 61 57 62 def wait_until_ready(self, executor: Executor) -> None: