Unverified Commit f0569829 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

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

parents b555fc31 51df42e9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -60,6 +60,11 @@ python3Packages.buildPythonApplication rec {
    "test_run_init_django"
    # Mock is broken for Unix FHS reasons.
    "test_run_pack_services"
    # Later version of craft-application is being used, which adds an
    # additional kind of file to be ignored, and invalidates a somewhat
    # static assertion. Can be removed in a later version once rockcraft
    # catches up with craft-application version.
    "test_lifecycle_args"
  ];

  versionCheckProgramArg = "--version";
+14 −0
Original line number Diff line number Diff line
diff --git i/tests/unit/test_application.py w/tests/unit/test_application.py
index d5da2454c..2a9bcd6f9 100644
--- i/tests/unit/test_application.py
+++ w/tests/unit/test_application.py
@@ -391,7 +391,8 @@ def test_esm_error(snapcraft_yaml, base, monkeypatch, capsys):
     _, err = capsys.readouterr()
 
     assert re.match(
-        rf"^Base {base!r} is not supported by this version of Snapcraft.\n"
+        rf"^Running snapcraft without a command will not be possible in future releases. Use 'snapcraft pack' instead.\n"
+        rf"Base {base!r} is not supported by this version of Snapcraft.\n"
         rf"Recommended resolution: Use Snapcraft .* from the '.*' channel of snapcraft where {base!r} was last supported.\n"
         r"For more information, check out: .*/reference/bases\n",
         err,
+6 −0
Original line number Diff line number Diff line
@@ -26,6 +26,12 @@ python312Packages.buildPythonApplication rec {
  };

  patches = [
    # We're using a later version of `craft-cli` than expected, which
    # adds an extra deprecation warning to the CLI output, meaning that
    # an expected error message looks slightly different. This patch corrects
    # that by checking for the updated error message and can be dropped in a
    # later release of snapcraft.
    ./esm-test.patch
    # Snapcraft is only officially distributed as a snap, as is LXD. The socket
    # path for LXD must be adjusted so that it's at the correct location for LXD
    # on NixOS. This patch will likely never be accepted upstream.
+9 −3
Original line number Diff line number Diff line
@@ -31,19 +31,19 @@

buildPythonPackage rec {
  pname = "craft-application";
  version = "5.4.0";
  version = "5.5.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "canonical";
    repo = "craft-application";
    tag = version;
    hash = "sha256-xWGcKJY5ov6SN8CCRK33rVDsDcvKtEnv7Zy9VBLJYYc=";
    hash = "sha256-eNca9+CBAGTQe6URMUYRaJR7TXFJA+dWcYIJdKyB3bw=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "setuptools==75.8.0" "setuptools"
      --replace-fail "setuptools==75.9.1" "setuptools"

      substituteInPlace craft_application/git/_utils.py \
        --replace-fail "/snap/core22/current/etc/ssl/certs" "${cacert}/etc/ssl/certs"
@@ -98,6 +98,12 @@ buildPythonPackage rec {
    # derivation. Once charmcraft has moved to craft-application >= 5, `--replace-fail` can be added.
    substituteInPlace tests/conftest.py \
      --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'"

    # The project attempts to write into the user's runtime directory, usually
    # '/run/user/<uid>', which fails in the build environment. By setting this
    # variable, we redirect the runtime directory lookup to the temp directory
    # created by the 'writableTmpDirAsHomeHook'.
    export XDG_RUNTIME_DIR="$HOME"
  '';

  pythonImportsCheck = [ "craft_application" ];
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

buildPythonPackage rec {
  pname = "craft-cli";
  version = "3.0.0";
  version = "3.1.2";

  pyproject = true;

@@ -24,7 +24,7 @@ buildPythonPackage rec {
    owner = "canonical";
    repo = "craft-cli";
    tag = version;
    hash = "sha256-RAnvx5519iXZnJm8jtY635e0DEL7jnIgZtTCindqMTY=";
    hash = "sha256-ryNHl/c8Pg2mGQHE9Dbd0bLU80NyCyxfhd2YQGEBN40=";
  };

  postPatch = ''
Loading