Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / b2sdk / default.nix
blob9c00f0c49cc9d8ddb661e853c99135e30dd60d8a
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   glibcLocales,
7   importlib-metadata,
8   logfury,
9   packaging,
10   pdm-backend,
11   pyfakefs,
12   pytest-lazy-fixture,
13   pytest-mock,
14   pytestCheckHook,
15   pythonOlder,
16   pythonRelaxDepsHook,
17   requests,
18   tqdm,
19   typing-extensions,
22 buildPythonPackage rec {
23   pname = "b2sdk";
24   version = "2.0.0";
25   pyproject = true;
27   disabled = pythonOlder "3.7";
29   src = fetchFromGitHub {
30     owner = "Backblaze";
31     repo = "b2-sdk-python";
32     rev = "refs/tags/v${version}";
33     hash = "sha256-0/UC4O19oO8SpboiPIhvkWBA8XHpc279fl377MooK54=";
34   };
36   build-system = [ pdm-backend ];
38   nativeBuildInputs = [ pythonRelaxDepsHook ];
40   pythonRemoveDeps = [ "setuptools" ];
42   dependencies =
43     [
44       packaging
45       logfury
46       requests
47     ]
48     ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]
49     ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
51   nativeCheckInputs = [
52     pyfakefs
53     pytest-lazy-fixture
54     pytest-mock
55     pytestCheckHook
56     tqdm
57   ] ++ lib.optionals stdenv.isLinux [ glibcLocales ];
59   disabledTestPaths = [
60     # requires aws s3 auth
61     "test/integration/test_download.py"
62     "test/integration/test_upload.py"
63   ];
65   disabledTests = [
66     # Test requires an API key
67     "test_raw_api"
68     "test_files_headers"
69     "test_large_file"
70     "test_file_info_b2_attributes"
71   ];
73   pythonImportsCheck = [ "b2sdk" ];
75   meta = with lib; {
76     description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
77     homepage = "https://github.com/Backblaze/b2-sdk-python";
78     changelog = "https://github.com/Backblaze/b2-sdk-python/blob/v${version}/CHANGELOG.md";
79     license = licenses.mit;
80     maintainers = with maintainers; [ ];
81   };