From 6831b4387c97f2e1a4eb0502eecb465395e82777 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Wed, 27 Mar 2024 16:38:28 -0300 Subject: [PATCH 1/2] python3Packages.b2sdk: 1.32.0 -> 1.33.0 --- pkgs/development/python-modules/b2sdk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/b2sdk/default.nix b/pkgs/development/python-modules/b2sdk/default.nix index a6a805fd33ad..a878a17b0f2a 100644 --- a/pkgs/development/python-modules/b2sdk/default.nix +++ b/pkgs/development/python-modules/b2sdk/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { pname = "b2sdk"; - version = "1.32.0"; + version = "1.33.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -28,7 +28,7 @@ buildPythonPackage rec { owner = "Backblaze"; repo = "b2-sdk-python"; rev = "refs/tags/v${version}"; - hash = "sha256-xBLMvH51zbrSuBOtMxLeQJt7Wv31OcxBbD72EuLHzuU="; + hash = "sha256-eMFgsjEb0DMTLqG+8IZru1dEAuKZW4dEszrznZxR+mc="; }; nativeBuildInputs = [ From 466042c346a4fbc618e3da2f8975b84c9ebff65a Mon Sep 17 00:00:00 2001 From: David McFarland Date: Wed, 27 Mar 2024 19:21:08 -0300 Subject: [PATCH 2/2] backblaze-b2: 3.15.0 -> 3.17.0 --- .../tools/backblaze-b2/default.nix | 57 ++++++++----------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/pkgs/development/tools/backblaze-b2/default.nix b/pkgs/development/tools/backblaze-b2/default.nix index 3ed49c05bec9..1fd6333a3d50 100644 --- a/pkgs/development/tools/backblaze-b2/default.nix +++ b/pkgs/development/tools/backblaze-b2/default.nix @@ -1,32 +1,30 @@ -{ lib, python3Packages, fetchPypi, installShellFiles, testers, backblaze-b2 +{ lib +, python3Packages +, fetchFromGitHub +, installShellFiles +, testers +, backblaze-b2 # executable is renamed to backblaze-b2 by default, to avoid collision with boost's 'b2' , execName ? "backblaze-b2" }: python3Packages.buildPythonApplication rec { pname = "backblaze-b2"; - version = "3.15.0"; - format = "setuptools"; + version = "3.17.0"; + format = "pyproject"; - src = fetchPypi { - inherit version; - pname = "b2"; - hash = "sha256-10c2zddALy7+CGxhjUC6tMLQcZ3WmLeRY1bNKWunAys="; + src = fetchFromGitHub { + owner = "Backblaze"; + repo = "B2_Command_Line_Tool"; + rev = "v${version}"; + hash = "sha256-Xj7RNe6XM2atijhVasILWRdTzu6xuKBzMllM1z1mFLY="; }; - postPatch = '' - substituteInPlace requirements.txt \ - --replace 'phx-class-registry==4.0.5' 'phx-class-registry' - substituteInPlace requirements.txt \ - --replace 'tabulate==0.8.10' 'tabulate' - substituteInPlace setup.py \ - --replace 'setuptools_scm<6.0' 'setuptools_scm' - ''; - nativeBuildInputs = [ installShellFiles - python3Packages.setuptools-scm - ]; + ] ++ (with python3Packages; [ + pdm-backend + ]); propagatedBuildInputs = with python3Packages; [ argcomplete @@ -46,31 +44,24 @@ python3Packages.buildPythonApplication rec { backoff more-itertools pexpect - - # backblaze-b2 requires pytest 7 to complete tests. - (pytestCheckHook.override { pytest = pytest_7; }) + pytestCheckHook + pytest-xdist ]; preCheck = '' export HOME=$(mktemp -d) ''; - disabledTests = [ - # require network - "test_files_headers" - "test_integration" - - # fixed by https://github.com/Backblaze/B2_Command_Line_Tool/pull/915 - "TestRmConsoleTool" - ]; - disabledTestPaths = [ # requires network "test/integration/test_b2_command_line.py" + "test/integration/test_tqdm_closer.py" # it's hard to make it work on nix "test/integration/test_autocomplete.py" - "test/unit/console_tool" + "test/unit/test_console_tool.py" + # this one causes successive tests to fail + "test/unit/_cli/test_autocomplete_cache.py" ]; postInstall = lib.optionalString (execName != "b2") '' @@ -88,7 +79,9 @@ python3Packages.buildPythonApplication rec { }).overrideAttrs (old: { # workaround the error: Permission denied: '/homeless-shelter' # backblaze-b2 fails to create a 'b2' directory under the XDG config path - HOME = "$(mktemp -d)"; + preHook = '' + export HOME=$(mktemp -d) + ''; }); meta = with lib; {