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