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