2022-01-27 00:19:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2022-01-27 00:19:43 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, requests
|
2022-06-26 10:26:21 +00:00
|
|
|
, setuptools
|
2022-04-27 09:35:20 +00:00
|
|
|
, six
|
2022-01-27 00:19:43 +00:00
|
|
|
, stone
|
2022-04-27 09:35:20 +00:00
|
|
|
, mock
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, sphinxHook
|
2022-01-27 00:19:43 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dropbox";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "11.36.2";
|
2022-01-27 00:19:43 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
outputs = ["out" "doc"];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dropbox";
|
|
|
|
repo = "dropbox-sdk-python";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-d++lxsbwPxnz1JPguWkImHXB+GQpMa9Uo3JNIxIe2ok=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
2022-06-26 10:26:21 +00:00
|
|
|
setuptools
|
2022-04-27 09:35:20 +00:00
|
|
|
six
|
2022-01-27 00:19:43 +00:00
|
|
|
stone
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
mock
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-08-27 14:25:00 +00:00
|
|
|
--replace "'pytest-runner == 5.2.0'," ""
|
2021-04-26 19:14:03 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"dropbox"
|
|
|
|
];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [ sphinxHook ];
|
|
|
|
|
|
|
|
# Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value.
|
|
|
|
disabledTests = [
|
|
|
|
"test_default_oauth2_urls"
|
|
|
|
"test_bad_auth"
|
|
|
|
"test_multi_auth"
|
|
|
|
"test_refresh"
|
|
|
|
"test_app_auth"
|
|
|
|
"test_downscope"
|
|
|
|
"test_rpc"
|
|
|
|
"test_upload_download"
|
|
|
|
"test_bad_upload_types"
|
|
|
|
"test_clone_when_user_linked"
|
|
|
|
"test_with_path_root_constructor"
|
|
|
|
"test_path_root"
|
|
|
|
"test_path_root_err"
|
|
|
|
"test_versioned_route"
|
|
|
|
"test_team"
|
|
|
|
"test_as_user"
|
|
|
|
"test_as_admin"
|
|
|
|
"test_clone_when_team_linked"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-01-27 00:19:43 +00:00
|
|
|
description = "Python library for Dropbox's HTTP-based Core and Datastore APIs";
|
|
|
|
homepage = "https://github.com/dropbox/dropbox-sdk-python";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/dropbox/dropbox-sdk-python/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ sfrijters ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|