1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
logfury,
annotated-types,
packaging,
pdm-backend,
pytest-lazy-fixtures,
pytest-mock,
pytest-timeout,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
requests,
responses,
tqdm,
typing-extensions,
}:
buildPythonPackage rec {
pname = "b2sdk";
version = "2.10.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Backblaze";
repo = "b2-sdk-python";
tag = "v${version}";
hash = "sha256-RWHD1ARPSKHmGKY0xdCBn3Qj4GxAfn4o8eacMQ5RT1k=";
};
build-system = [ pdm-backend ];
dependencies = [
annotated-types
packaging
logfury
requests
]
++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
nativeCheckInputs = [
pytest-lazy-fixtures
pytest-mock
pytest-timeout
pytestCheckHook
responses
tqdm
];
enabledTestPaths = [
"test/unit"
];
disabledTests = lib.optionals (pythonAtLeast "3.14") [
# - 'could not be accessed (no permissions to read?)',
# + 'could not be accessed (broken symlink?)',
"test_dir_without_exec_permission"
];
pythonImportsCheck = [ "b2sdk" ];
meta = {
description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
homepage = "https://github.com/Backblaze/b2-sdk-python";
changelog = "https://github.com/Backblaze/b2-sdk-python/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pmw ];
};
}
|