Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.0"; 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-J2AaGkD4TMDcVzTtdcNH0bgy6de+BRjYdtTaRL3lYrs="; 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 ">= 2.*" ">= 2.0" \ 46 --replace "'pytest-runner == 5.2.0'," "" 47 substituteInPlace test/requirements.txt \ 48 --replace ">=2.*" ">=2.0" 49 ''; 50 51 doCheck = true; 52 53 pythonImportsCheck = [ 54 "dropbox" 55 ]; 56 nativeBuildInputs = [ sphinxHook ]; 57 58 # Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value. 59 disabledTests = [ 60 "test_default_oauth2_urls" 61 "test_bad_auth" 62 "test_multi_auth" 63 "test_refresh" 64 "test_app_auth" 65 "test_downscope" 66 "test_rpc" 67 "test_upload_download" 68 "test_bad_upload_types" 69 "test_clone_when_user_linked" 70 "test_with_path_root_constructor" 71 "test_path_root" 72 "test_path_root_err" 73 "test_versioned_route" 74 "test_team" 75 "test_as_user" 76 "test_as_admin" 77 "test_clone_when_team_linked" 78 ]; 79 80 meta = with lib; { 81 description = "Python library for Dropbox's HTTP-based Core and Datastore APIs"; 82 homepage = "https://github.com/dropbox/dropbox-sdk-python"; 83 changelog = "https://github.com/dropbox/dropbox-sdk-python/releases/tag/v${version}"; 84 license = licenses.mit; 85 maintainers = with maintainers; [ sfrijters ]; 86 }; 87}