1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, requests 6, setuptools 7, six 8, stone 9, mock 10, pytest-mock 11, pytestCheckHook 12, sphinxHook 13}: 14 15buildPythonPackage rec { 16 pname = "dropbox"; 17 version = "11.36.2"; 18 format = "setuptools"; 19 20 disabled = pythonOlder "3.7"; 21 outputs = ["out" "doc"]; 22 23 src = fetchFromGitHub { 24 owner = "dropbox"; 25 repo = "dropbox-sdk-python"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-d++lxsbwPxnz1JPguWkImHXB+GQpMa9Uo3JNIxIe2ok="; 28 }; 29 30 propagatedBuildInputs = [ 31 requests 32 setuptools 33 six 34 stone 35 ]; 36 37 nativeCheckInputs = [ 38 mock 39 pytest-mock 40 pytestCheckHook 41 ]; 42 43 postPatch = '' 44 substituteInPlace setup.py \ 45 --replace "'pytest-runner == 5.2.0'," "" 46 ''; 47 48 doCheck = true; 49 50 pythonImportsCheck = [ 51 "dropbox" 52 ]; 53 54 nativeBuildInputs = [ sphinxHook ]; 55 56 # Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value. 57 disabledTests = [ 58 "test_default_oauth2_urls" 59 "test_bad_auth" 60 "test_multi_auth" 61 "test_refresh" 62 "test_app_auth" 63 "test_downscope" 64 "test_rpc" 65 "test_upload_download" 66 "test_bad_upload_types" 67 "test_clone_when_user_linked" 68 "test_with_path_root_constructor" 69 "test_path_root" 70 "test_path_root_err" 71 "test_versioned_route" 72 "test_team" 73 "test_as_user" 74 "test_as_admin" 75 "test_clone_when_team_linked" 76 ]; 77 78 meta = with lib; { 79 description = "Python library for Dropbox's HTTP-based Core and Datastore APIs"; 80 homepage = "https://github.com/dropbox/dropbox-sdk-python"; 81 changelog = "https://github.com/dropbox/dropbox-sdk-python/releases/tag/v${version}"; 82 license = licenses.mit; 83 maintainers = with maintainers; [ sfrijters ]; 84 }; 85}