Merge pull request #170289 from SFrijters/python-dropbox-cleanup

python3Packages.dropbox: Clean up package and enable more tests
This commit is contained in:
Thiago Kenji Okada 2022-04-25 23:47:41 +01:00 committed by GitHub
commit 8e9dc9e619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,13 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, pythonOlder
, fetchFromGitHub , fetchFromGitHub
, requests , requests
, urllib3 , six
, mock
, setuptools
, stone , stone
, pythonOlder , mock
, pytest-mock
, pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -20,29 +21,54 @@ buildPythonPackage rec {
owner = "dropbox"; owner = "dropbox";
repo = "dropbox-sdk-python"; repo = "dropbox-sdk-python";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-pq/LkyOCS0PnujfN9aIx42aeZ8tw4XvRQ4Vid/nXgWE="; hash = "sha256-w07r95MBAClf0F3SICiZsHLdslzf+JuxC+BVdTACCog=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
requests requests
urllib3 six
mock
setuptools
stone stone
]; ];
checkInputs = [
mock
pytest-mock
pytestCheckHook
];
postPatch = '' postPatch = ''
substituteInPlace setup.py \ substituteInPlace setup.py \
--replace "'pytest-runner == 5.2.0'," "" --replace "'pytest-runner == 5.2.0'," ""
''; '';
# Set DROPBOX_TOKEN environment variable to a valid token. doCheck = true;
doCheck = false;
pythonImportsCheck = [ pythonImportsCheck = [
"dropbox" "dropbox"
]; ];
# 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"
];
meta = with lib; { meta = with lib; {
description = "Python library for Dropbox's HTTP-based Core and Datastore APIs"; description = "Python library for Dropbox's HTTP-based Core and Datastore APIs";
homepage = "https://github.com/dropbox/dropbox-sdk-python"; homepage = "https://github.com/dropbox/dropbox-sdk-python";