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 "test_run_init_django" 61 # Mock is broken for Unix FHS reasons. 62 "test_run_pack_services" 63 ]; 64 65 versionCheckProgramArg = "--version";
··· 60 "test_run_init_django" 61 # Mock is broken for Unix FHS reasons. 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" 68 ]; 69 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 }; 27 28 patches = [ 29 # Snapcraft is only officially distributed as a snap, as is LXD. The socket 30 # path for LXD must be adjusted so that it's at the correct location for LXD 31 # on NixOS. This patch will likely never be accepted upstream.
··· 26 }; 27 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 35 # Snapcraft is only officially distributed as a snap, as is LXD. The socket 36 # path for LXD must be adjusted so that it's at the correct location for LXD 37 # on NixOS. This patch will likely never be accepted upstream.
+9 -3
pkgs/development/python-modules/craft-application/default.nix
··· 31 32 buildPythonPackage rec { 33 pname = "craft-application"; 34 - version = "5.4.0"; 35 pyproject = true; 36 37 src = fetchFromGitHub { 38 owner = "canonical"; 39 repo = "craft-application"; 40 tag = version; 41 - hash = "sha256-xWGcKJY5ov6SN8CCRK33rVDsDcvKtEnv7Zy9VBLJYYc="; 42 }; 43 44 postPatch = '' 45 substituteInPlace pyproject.toml \ 46 - --replace-fail "setuptools==75.8.0" "setuptools" 47 48 substituteInPlace craft_application/git/_utils.py \ 49 --replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs" ··· 98 # derivation. Once charmcraft has moved to craft-application >= 5, `--replace-fail` can be added. 99 substituteInPlace tests/conftest.py \ 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 103 pythonImportsCheck = [ "craft_application" ];
··· 31 32 buildPythonPackage rec { 33 pname = "craft-application"; 34 + version = "5.5.0"; 35 pyproject = true; 36 37 src = fetchFromGitHub { 38 owner = "canonical"; 39 repo = "craft-application"; 40 tag = version; 41 + hash = "sha256-eNca9+CBAGTQe6URMUYRaJR7TXFJA+dWcYIJdKyB3bw="; 42 }; 43 44 postPatch = '' 45 substituteInPlace pyproject.toml \ 46 + --replace-fail "setuptools==75.9.1" "setuptools" 47 48 substituteInPlace craft_application/git/_utils.py \ 49 --replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs" ··· 98 # derivation. Once charmcraft has moved to craft-application >= 5, `--replace-fail` can be added. 99 substituteInPlace tests/conftest.py \ 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" 107 ''; 108 109 pythonImportsCheck = [ "craft_application" ];
+2 -2
pkgs/development/python-modules/craft-cli/default.nix
··· 16 17 buildPythonPackage rec { 18 pname = "craft-cli"; 19 - version = "3.0.0"; 20 21 pyproject = true; 22 ··· 24 owner = "canonical"; 25 repo = "craft-cli"; 26 tag = version; 27 - hash = "sha256-RAnvx5519iXZnJm8jtY635e0DEL7jnIgZtTCindqMTY="; 28 }; 29 30 postPatch = ''
··· 16 17 buildPythonPackage rec { 18 pname = "craft-cli"; 19 + version = "3.1.2"; 20 21 pyproject = true; 22 ··· 24 owner = "canonical"; 25 repo = "craft-cli"; 26 tag = version; 27 + hash = "sha256-ryNHl/c8Pg2mGQHE9Dbd0bLU80NyCyxfhd2YQGEBN40="; 28 }; 29 30 postPatch = ''
+3 -3
pkgs/development/python-modules/craft-providers/default.nix
··· 21 22 buildPythonPackage rec { 23 pname = "craft-providers"; 24 - version = "2.3.1"; 25 26 pyproject = true; 27 ··· 29 owner = "canonical"; 30 repo = "craft-providers"; 31 tag = version; 32 - hash = "sha256-MeQOqw0F4OwaooHHrUh3qITTOFNXG1Qg1oJcYxRQTz0="; 33 }; 34 35 patches = [ ··· 51 # The urllib3 incompat: https://github.com/msabramo/requests-unixsocket/pull/69 52 # This is already patched in nixpkgs. 53 substituteInPlace pyproject.toml \ 54 - --replace-fail "setuptools==75.2.0" "setuptools" 55 ''; 56 57 pythonRelaxDeps = [ "requests" ];
··· 21 22 buildPythonPackage rec { 23 pname = "craft-providers"; 24 + version = "2.4.0"; 25 26 pyproject = true; 27 ··· 29 owner = "canonical"; 30 repo = "craft-providers"; 31 tag = version; 32 + hash = "sha256-frcRv+19czsZ948SEKfYsMUP6n9MbJv6gxXUAdwFw4Y="; 33 }; 34 35 patches = [ ··· 51 # The urllib3 incompat: https://github.com/msabramo/requests-unixsocket/pull/69 52 # This is already patched in nixpkgs. 53 substituteInPlace pyproject.toml \ 54 + --replace-fail "setuptools==75.9.1" "setuptools" 55 ''; 56 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): 6 ), 7 ) 8 ··· 21 - f" channel {snap.channel!r} in target environment." 22 - ), 23 - details=error.details, 24 - ) from error 25 - else: 26 - try: ··· 38 - details=error.details, 39 - ) from error 40 + try: 41 - + channel = "latest/beta" 42 + snap_installer.install_from_store( 43 + executor=executor, 44 + snap_name=snap.name, 45 - + channel=channel, 46 + classic=snap.classic, 47 + ) 48 + except SnapInstallationError as error: 49 + raise BaseConfigurationError( 50 + brief=( 51 + f"failed to install snap {snap.name!r} from store" 52 - + f" channel {channel!r} in target environment." 53 + ), 54 + details=error.details, 55 + ) from error 56 57 def wait_until_ready(self, executor: Executor) -> None:
··· 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 ), 7 ) 8 ··· 21 - f" channel {snap.channel!r} in target environment." 22 - ), 23 - details=error.details, 24 + - resolution=( 25 + - "Check Snap store status at https://status.snapcraft.io" 26 + - ), 27 - ) from error 28 - else: 29 - try: ··· 41 - details=error.details, 42 - ) from error 43 + try: 44 + snap_installer.install_from_store( 45 + executor=executor, 46 + snap_name=snap.name, 47 + + channel=snap.channel, 48 + classic=snap.classic, 49 + ) 50 + except SnapInstallationError as error: 51 + raise BaseConfigurationError( 52 + brief=( 53 + f"failed to install snap {snap.name!r} from store" 54 + + f" channel {snap.channel!r} in target environment." 55 + ), 56 + details=error.details, 57 + + resolution=( 58 + + "Check Snap store status at https://status.snapcraft.io" 59 + + ), 60 + ) from error 61 62 def wait_until_ready(self, executor: Executor) -> None: