diff options
| author | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
|---|---|---|
| committer | Robin Gloster <mail@glob.in> | 2021-05-24 09:55:24 -0500 |
| commit | 4bc5fbef9d159e143fb7e2c3231932e6e76f667c (patch) | |
| tree | e2198f5c552e0667d838b8ec764ddb3a4d8f6dec /pkgs/development/python-modules/b2sdk/default.nix | |
| parent | jq: fix build with structured-attrs on darwin (diff) | |
| parent | Merge pull request #123802 from superherointj/package-virtmanager-bugfix (diff) | |
| download | nixpkgs-origin/structured-attrs.tar.gz | |
Merge remote-tracking branch 'upstream/master' into structured-attrsorigin/structured-attrs
Diffstat (limited to 'pkgs/development/python-modules/b2sdk/default.nix')
| -rw-r--r-- | pkgs/development/python-modules/b2sdk/default.nix | 55 |
1 files changed, 43 insertions, 12 deletions
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; }; |
