nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 71 lines 1.3 kB view raw
1{ lib 2, arrow 3, buildPythonPackage 4, fetchPypi 5, importlib-metadata 6, logfury 7, pytestCheckHook 8, pytest-lazy-fixture 9, pytest-mock 10, pythonOlder 11, requests 12, setuptools-scm 13, tqdm 14}: 15 16buildPythonPackage rec { 17 pname = "b2sdk"; 18 version = "1.14.1"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = "sha256-fYOeyhKm9mRT61NcQVaXFKeRC8AS9lfIZMO/s6iFaeg="; 26 }; 27 28 nativeBuildInputs = [ 29 setuptools-scm 30 ]; 31 32 propagatedBuildInputs = [ 33 arrow 34 logfury 35 requests 36 tqdm 37 ] ++ lib.optionals (pythonOlder "3.8") [ 38 importlib-metadata 39 ]; 40 41 checkInputs = [ 42 pytestCheckHook 43 pytest-lazy-fixture 44 pytest-mock 45 ]; 46 47 postPatch = '' 48 substituteInPlace setup.py \ 49 --replace 'setuptools_scm<6.0' 'setuptools_scm' 50 substituteInPlace requirements.txt \ 51 --replace 'arrow>=0.8.0,<1.0.0' 'arrow' 52 ''; 53 54 disabledTests = [ 55 # Test requires an API key 56 "test_raw_api" 57 "test_files_headers" 58 "test_large_file" 59 ]; 60 61 pythonImportsCheck = [ 62 "b2sdk" 63 ]; 64 65 meta = with lib; { 66 description = "Client library and utilities for access to B2 Cloud Storage (backblaze)"; 67 homepage = "https://github.com/Backblaze/b2-sdk-python"; 68 license = licenses.mit; 69 maintainers = with maintainers; [ ]; 70 }; 71}