From 06efb08ec4377a9b6ecd0e22ba7b4b929fbcb533 Mon Sep 17 00:00:00 2001 From: Vojtěch Káně Date: Sat, 8 May 2021 13:53:30 +0200 Subject: backblaze-b2: 2.1.0 -> 2.4.0 (#121250) * python3Packages.b2sdk: 1.6.0 -> 1.7.0 * python3Packages.b2sdk: enable tests * pythonPackages.rst2ansi: init at 0.1.5 * backblaze-b2: 2.1.0 -> 2.4.0 Co-authored-by: Fabian Affolter --- pkgs/development/python-modules/b2sdk/default.nix | 55 ++++++++++++++++++----- 1 file changed, 43 insertions(+), 12 deletions(-) (limited to 'pkgs/development/python-modules/b2sdk/default.nix') diff --git a/pkgs/development/python-modules/b2sdk/default.nix b/pkgs/development/python-modules/b2sdk/default.nix index b4a3e7acaec0..47ed0fe5fd68 100644 --- a/pkgs/development/python-modules/b2sdk/default.nix +++ b/pkgs/development/python-modules/b2sdk/default.nix @@ -1,17 +1,48 @@ -{ lib, buildPythonPackage, fetchPypi, setuptools-scm, isPy27, pytestCheckHook -, requests, arrow, logfury, tqdm }: +{ lib +, arrow +, buildPythonPackage +, fetchPypi +, importlib-metadata +, isPy27 +, logfury +, pytestCheckHook +, pytest-lazy-fixture +, pytest-mock +, pythonOlder +, requests +, setuptools-scm +, tqdm +}: buildPythonPackage rec { pname = "b2sdk"; - version = "1.6.0"; - + version = "1.7.0"; disabled = isPy27; src = fetchPypi { inherit pname version; - sha256 = "sha256-6fjreuMUC056ljddfAidfBbJkvEDndB/dIkx1bF7efs="; + sha256 = "sha256-8X5XLh9SxZI1P7/2ZjOy8ipcEzTcriJfGI7KlMXncv4="; }; + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + arrow + logfury + requests + tqdm + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + checkInputs = [ + pytestCheckHook + pytest-lazy-fixture + pytest-mock + ]; + postPatch = '' substituteInPlace setup.py \ --replace 'setuptools_scm<6.0' 'setuptools_scm' @@ -19,16 +50,16 @@ buildPythonPackage rec { --replace 'arrow>=0.8.0,<1.0.0' 'arrow' ''; - pythonImportsCheck = [ "b2sdk" ]; - - nativeBuildInputs = [ setuptools-scm ]; - propagatedBuildInputs = [ requests arrow logfury tqdm ]; + disabledTests = [ + # Test requires an API key + "test_raw_api" + "test_files_headers" + ]; - # requires unpackaged dependencies like liccheck - doCheck = false; + pythonImportsCheck = [ "b2sdk" ]; 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)"; homepage = "https://github.com/Backblaze/b2-sdk-python"; license = licenses.mit; }; -- cgit v1.2.3