2021-05-08 11:53:30 +00:00
|
|
|
{ lib
|
|
|
|
, arrow
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, importlib-metadata
|
|
|
|
, logfury
|
2022-07-16 10:58:59 +00:00
|
|
|
, pyfakefs
|
2021-05-08 11:53:30 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-lazy-fixture
|
|
|
|
, pytest-mock
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, setuptools-scm
|
|
|
|
, tqdm
|
|
|
|
}:
|
2020-08-17 19:56:07 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "b2sdk";
|
2022-09-20 06:17:56 +00:00
|
|
|
version = "1.18.0";
|
2022-02-25 07:41:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-08-17 19:56:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-20 06:17:56 +00:00
|
|
|
hash = "sha256-knLyjRjUmLZtM9dJoPBeSdm7GpE0+UJhwLi/obVvPuw=";
|
2020-08-17 19:56:07 +00:00
|
|
|
};
|
|
|
|
|
2021-05-08 11:53:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
arrow
|
|
|
|
logfury
|
|
|
|
requests
|
|
|
|
tqdm
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-lazy-fixture
|
|
|
|
pytest-mock
|
2022-07-16 10:58:59 +00:00
|
|
|
pyfakefs
|
2021-05-08 11:53:30 +00:00
|
|
|
];
|
|
|
|
|
2021-04-21 19:01:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'setuptools_scm<6.0' 'setuptools_scm'
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace 'arrow>=0.8.0,<1.0.0' 'arrow'
|
|
|
|
'';
|
|
|
|
|
2022-07-16 10:58:59 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# requires aws s3 auth
|
|
|
|
"test/integration/test_download.py"
|
|
|
|
];
|
|
|
|
|
2021-05-08 11:53:30 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test requires an API key
|
|
|
|
"test_raw_api"
|
|
|
|
"test_files_headers"
|
2021-07-07 15:41:39 +00:00
|
|
|
"test_large_file"
|
2021-05-08 11:53:30 +00:00
|
|
|
];
|
2020-08-17 19:56:07 +00:00
|
|
|
|
2021-10-24 19:15:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"b2sdk"
|
|
|
|
];
|
2020-08-17 19:56:07 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-05-08 11:53:30 +00:00
|
|
|
description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
|
2020-08-17 19:56:07 +00:00
|
|
|
homepage = "https://github.com/Backblaze/b2-sdk-python";
|
|
|
|
license = licenses.mit;
|
2022-02-25 07:41:05 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-08-17 19:56:07 +00:00
|
|
|
};
|
|
|
|
}
|