2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, arrow
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, importlib-metadata
|
|
|
|
, logfury
|
2022-08-12 12:06:08 +00:00
|
|
|
, pyfakefs
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-lazy-fixture
|
|
|
|
, pytest-mock
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, setuptools-scm
|
|
|
|
, tqdm
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "b2sdk";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "1.18.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-22 12:36:57 +00:00
|
|
|
hash = "sha256-knLyjRjUmLZtM9dJoPBeSdm7GpE0+UJhwLi/obVvPuw=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +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-08-12 12:06:08 +00:00
|
|
|
pyfakefs
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2021-04-26 19:14:03 +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-08-12 12:06:08 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# requires aws s3 auth
|
|
|
|
"test/integration/test_download.py"
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test requires an API key
|
|
|
|
"test_raw_api"
|
|
|
|
"test_files_headers"
|
2021-08-10 14:31:46 +00:00
|
|
|
"test_large_file"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"b2sdk"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/Backblaze/b2-sdk-python";
|
|
|
|
license = licenses.mit;
|
2022-03-05 16:20:37 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|