Merge pull request #301896 from r-ryantm/auto-update/python312Packages.b2sdk

python312Packages.b2sdk: 1.33.0 -> 2.0.0
This commit is contained in:
Fabian Affolter 2024-04-06 21:15:46 +02:00 committed by GitHub
commit 888d5c0b6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 57 additions and 56 deletions

View File

@ -1,26 +1,27 @@
{ lib {
, stdenv lib,
, buildPythonPackage stdenv,
, fetchFromGitHub buildPythonPackage,
, glibcLocales fetchFromGitHub,
, importlib-metadata glibcLocales,
, packaging importlib-metadata,
, logfury logfury,
, pyfakefs packaging,
, pytestCheckHook pdm-backend,
, pytest-lazy-fixture pyfakefs,
, pytest-mock pytest-lazy-fixture,
, pythonOlder pytest-mock,
, pythonRelaxDepsHook pytestCheckHook,
, pdm-backend pythonOlder,
, requests pythonRelaxDepsHook,
, tqdm requests,
, typing-extensions tqdm,
typing-extensions,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "b2sdk"; pname = "b2sdk";
version = "1.33.0"; version = "2.0.0";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -29,37 +30,31 @@ buildPythonPackage rec {
owner = "Backblaze"; owner = "Backblaze";
repo = "b2-sdk-python"; repo = "b2-sdk-python";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-eMFgsjEb0DMTLqG+8IZru1dEAuKZW4dEszrznZxR+mc="; hash = "sha256-0/UC4O19oO8SpboiPIhvkWBA8XHpc279fl377MooK54=";
}; };
nativeBuildInputs = [ build-system = [ pdm-backend ];
pdm-backend
pythonRelaxDepsHook
];
pythonRemoveDeps = [ nativeBuildInputs = [ pythonRelaxDepsHook ];
"setuptools"
];
propagatedBuildInputs = [ pythonRemoveDeps = [ "setuptools" ];
packaging
logfury dependencies =
requests [
tqdm packaging
] ++ lib.optionals (pythonOlder "3.8") [ logfury
importlib-metadata requests
] ++ lib.optionals (pythonOlder "3.12") [ ]
typing-extensions ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]
]; ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pyfakefs
pytest-lazy-fixture pytest-lazy-fixture
pytest-mock pytest-mock
pyfakefs pytestCheckHook
] ++ lib.optionals stdenv.isLinux [ tqdm
glibcLocales ] ++ lib.optionals stdenv.isLinux [ glibcLocales ];
];
disabledTestPaths = [ disabledTestPaths = [
# requires aws s3 auth # requires aws s3 auth
@ -75,9 +70,7 @@ buildPythonPackage rec {
"test_file_info_b2_attributes" "test_file_info_b2_attributes"
]; ];
pythonImportsCheck = [ pythonImportsCheck = [ "b2sdk" ];
"b2sdk"
];
meta = with lib; { meta = with lib; {
description = "Client library and utilities for access to B2 Cloud Storage (backblaze)"; description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";

View File

@ -10,23 +10,25 @@
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
pname = "backblaze-b2"; pname = "backblaze-b2";
version = "3.17.0"; version = "3.18.0";
format = "pyproject"; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Backblaze"; owner = "Backblaze";
repo = "B2_Command_Line_Tool"; repo = "B2_Command_Line_Tool";
rev = "v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-Xj7RNe6XM2atijhVasILWRdTzu6xuKBzMllM1z1mFLY="; hash = "sha256-1UXByc3jjp8GN7+aI2GBohJ0DFxgp604QOsXp5GaL4Q=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
installShellFiles installShellFiles
] ++ (with python3Packages; [ ];
pdm-backend
]);
propagatedBuildInputs = with python3Packages; [ build-system = with python3Packages; [
pdm-backend
];
dependencies = with python3Packages; [
argcomplete argcomplete
arrow arrow
b2sdk b2sdk
@ -53,10 +55,9 @@ python3Packages.buildPythonApplication rec {
''; '';
disabledTestPaths = [ disabledTestPaths = [
# requires network # Test requires network
"test/integration/test_b2_command_line.py" "test/integration/test_b2_command_line.py"
"test/integration/test_tqdm_closer.py" "test/integration/test_tqdm_closer.py"
# it's hard to make it work on nix # it's hard to make it work on nix
"test/integration/test_autocomplete.py" "test/integration/test_autocomplete.py"
"test/unit/test_console_tool.py" "test/unit/test_console_tool.py"
@ -64,6 +65,13 @@ python3Packages.buildPythonApplication rec {
"test/unit/_cli/test_autocomplete_cache.py" "test/unit/_cli/test_autocomplete_cache.py"
]; ];
disabledTests = [
# Autocomplete is not successful in a sandbox
"test_autocomplete_installer"
"test_help"
"test_install_autocomplete"
];
postInstall = lib.optionalString (execName != "b2") '' postInstall = lib.optionalString (execName != "b2") ''
mv "$out/bin/b2" "$out/bin/${execName}" mv "$out/bin/b2" "$out/bin/${execName}"
'' ''
@ -86,10 +94,10 @@ python3Packages.buildPythonApplication rec {
meta = with lib; { meta = with lib; {
description = "Command-line tool for accessing the Backblaze B2 storage service"; description = "Command-line tool for accessing the Backblaze B2 storage service";
mainProgram = "backblaze-b2";
homepage = "https://github.com/Backblaze/B2_Command_Line_Tool"; homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
changelog = "https://github.com/Backblaze/B2_Command_Line_Tool/blob/v${version}/CHANGELOG.md"; changelog = "https://github.com/Backblaze/B2_Command_Line_Tool/blob/v${version}/CHANGELOG.md";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ hrdinka tomhoule ]; maintainers = with maintainers; [ hrdinka tomhoule ];
mainProgram = "backblaze-b2";
}; };
} }