Unverified Commit 888d5c0b authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

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

python312Packages.b2sdk: 1.33.0 -> 2.0.0
parents 23ea7fa9 152d684f
Loading
Loading
Loading
Loading
+38 −45
Original line number Diff line number Diff line
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, glibcLocales
, importlib-metadata
, packaging
, logfury
, pyfakefs
, pytestCheckHook
, pytest-lazy-fixture
, pytest-mock
, pythonOlder
, pythonRelaxDepsHook
, pdm-backend
, requests
, tqdm
, typing-extensions
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  glibcLocales,
  importlib-metadata,
  logfury,
  packaging,
  pdm-backend,
  pyfakefs,
  pytest-lazy-fixture,
  pytest-mock,
  pytestCheckHook,
  pythonOlder,
  pythonRelaxDepsHook,
  requests,
  tqdm,
  typing-extensions,
}:

buildPythonPackage rec {
  pname = "b2sdk";
  version = "1.33.0";
  version = "2.0.0";
  pyproject = true;

  disabled = pythonOlder "3.7";
@@ -29,37 +30,31 @@ buildPythonPackage rec {
    owner = "Backblaze";
    repo = "b2-sdk-python";
    rev = "refs/tags/v${version}";
    hash = "sha256-eMFgsjEb0DMTLqG+8IZru1dEAuKZW4dEszrznZxR+mc=";
    hash = "sha256-0/UC4O19oO8SpboiPIhvkWBA8XHpc279fl377MooK54=";
  };

  nativeBuildInputs = [
    pdm-backend
    pythonRelaxDepsHook
  ];
  build-system = [ pdm-backend ];

  pythonRemoveDeps = [
    "setuptools"
  ];
  nativeBuildInputs = [ pythonRelaxDepsHook ];

  pythonRemoveDeps = [ "setuptools" ];

  propagatedBuildInputs = [
  dependencies =
    [
      packaging
      logfury
      requests
    tqdm
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
  ] ++ lib.optionals (pythonOlder "3.12") [
    typing-extensions
  ];
    ]
    ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]
    ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];

  nativeCheckInputs = [
    pytestCheckHook
    pyfakefs
    pytest-lazy-fixture
    pytest-mock
    pyfakefs
  ] ++ lib.optionals stdenv.isLinux [
    glibcLocales
  ];
    pytestCheckHook
    tqdm
  ] ++ lib.optionals stdenv.isLinux [ glibcLocales ];

  disabledTestPaths = [
    # requires aws s3 auth
@@ -75,9 +70,7 @@ buildPythonPackage rec {
    "test_file_info_b2_attributes"
  ];

  pythonImportsCheck = [
    "b2sdk"
  ];
  pythonImportsCheck = [ "b2sdk" ];

  meta = with lib; {
    description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
+18 −10
Original line number Diff line number Diff line
@@ -10,23 +10,25 @@

python3Packages.buildPythonApplication rec {
  pname = "backblaze-b2";
  version = "3.17.0";
  format = "pyproject";
  version = "3.18.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Backblaze";
    repo = "B2_Command_Line_Tool";
    rev = "v${version}";
    hash = "sha256-Xj7RNe6XM2atijhVasILWRdTzu6xuKBzMllM1z1mFLY=";
    rev = "refs/tags/v${version}";
    hash = "sha256-1UXByc3jjp8GN7+aI2GBohJ0DFxgp604QOsXp5GaL4Q=";
  };

  nativeBuildInputs = [
    installShellFiles
  ] ++ (with python3Packages; [
  ];

  build-system = with python3Packages; [
    pdm-backend
  ]);
  ];

  propagatedBuildInputs = with python3Packages; [
  dependencies = with python3Packages; [
    argcomplete
    arrow
    b2sdk
@@ -53,10 +55,9 @@ python3Packages.buildPythonApplication rec {
  '';

  disabledTestPaths = [
    # requires network
    # Test 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/test_console_tool.py"
@@ -64,6 +65,13 @@ python3Packages.buildPythonApplication rec {
    "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") ''
    mv "$out/bin/b2" "$out/bin/${execName}"
  ''
@@ -86,10 +94,10 @@ python3Packages.buildPythonApplication rec {

  meta = with lib; {
    description = "Command-line tool for accessing the Backblaze B2 storage service";
    mainProgram = "backblaze-b2";
    homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
    changelog = "https://github.com/Backblaze/B2_Command_Line_Tool/blob/v${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ hrdinka tomhoule ];
    mainProgram = "backblaze-b2";
  };
}