home-assistant: 2025.1.1 -> 2025.1.2 (#372513)
[NixPkgs.git] / pkgs / development / python-modules / dropbox / default.nix
blob59eb019d66a49c843aa7381cfae5e99a1f52139f
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   setuptools,
7   requests,
8   six,
9   stone,
10   mock,
11   pytest-mock,
12   pytestCheckHook,
13   sphinxHook,
14   sphinx-rtd-theme,
17 buildPythonPackage rec {
18   pname = "dropbox";
19   version = "12.0.2";
20   pyproject = true;
22   disabled = pythonOlder "3.7";
24   outputs = [
25     "out"
26     "doc"
27   ];
29   src = fetchFromGitHub {
30     owner = "dropbox";
31     repo = "dropbox-sdk-python";
32     tag = "v${version}";
33     hash = "sha256-9Fsh06V226vIyJhrlLkh9Xr4UGoEIISnIFCtuKqI218=";
34   };
36   build-system = [ setuptools ];
38   dependencies = [
39     requests
40     six
41     stone
42   ];
44   nativeCheckInputs = [
45     mock
46     pytest-mock
47     pytestCheckHook
48   ];
50   postPatch = ''
51     substituteInPlace setup.py \
52       --replace "'pytest-runner==5.2.0'," ""
53   '';
55   pythonImportsCheck = [ "dropbox" ];
57   nativeBuildInputs = [
58     sphinxHook
59     sphinx-rtd-theme
60   ];
62   # Version 12.0.0 re-introduced Python 2 support and set some very restrictive version bounds
63   # https://github.com/dropbox/dropbox-sdk-python/commit/75596daf316b4a806f18057e2797a15bdf83cf6d
64   # This will be the last major version to support Python 2, so version bounds might be more reasonable again in the future.
65   pythonRelaxDeps = [
66     "stone"
67   ];
69   # Set SCOPED_USER_DROPBOX_TOKEN environment variable to a valid value.
70   disabledTests = [
71     "test_default_oauth2_urls"
72     "test_bad_auth"
73     "test_multi_auth"
74     "test_refresh"
75     "test_app_auth"
76     "test_downscope"
77     "test_rpc"
78     "test_upload_download"
79     "test_bad_upload_types"
80     "test_clone_when_user_linked"
81     "test_with_path_root_constructor"
82     "test_path_root"
83     "test_path_root_err"
84     "test_versioned_route"
85     "test_team"
86     "test_as_user"
87     "test_as_admin"
88     "test_clone_when_team_linked"
89     "test_bad_pins"
90     "test_bad_pins_session"
91   ];
93   meta = with lib; {
94     description = "Python library for Dropbox's HTTP-based Core and Datastore APIs";
95     homepage = "https://github.com/dropbox/dropbox-sdk-python";
96     changelog = "https://github.com/dropbox/dropbox-sdk-python/releases/tag/v${version}";
97     license = licenses.mit;
98     maintainers = with maintainers; [ sfrijters ];
99   };