1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, fetchPypi
6, setuptools
7, setuptools-scm
8, requests
9, lomond
10, colorlog
11, keyring
12, requests-toolbelt
13, jaraco_collections
14, jaraco-context
15, jaraco_classes
16, jaraco-net
17, more-itertools
18, importlib-resources
19, bx-py-utils
20, platformdirs
21, jaraco_itertools
22, pytestCheckHook
23, requests-mock
24}:
25
26buildPythonPackage rec {
27 pname = "jaraco-abode";
28 version = "5.0.1";
29
30 disabled = pythonOlder "3.7";
31
32 format = "pyproject";
33
34 src = fetchFromGitHub {
35 owner = "jaraco";
36 repo = "jaraco.abode";
37 rev = "refs/tags/v${version}";
38 hash = "sha256-vKlvZrgRKv2C43JLfl4Wum4Icz9yOKEaB6qKapZ0rwQ=";
39 };
40
41 postPatch = ''
42 # https://github.com/jaraco/jaraco.abode/issues/19
43 echo "graft jaraco" > MANIFEST.in
44 '';
45
46 nativeBuildInputs = [
47 setuptools
48 setuptools-scm
49 ];
50
51 SETUPTOOLS_SCM_PRETEND_VERSION = version;
52
53 propagatedBuildInputs = [
54 requests
55 lomond
56 colorlog
57 keyring
58 requests-toolbelt
59 jaraco_collections
60 jaraco-context
61 jaraco_classes
62 jaraco-net
63 more-itertools
64 importlib-resources
65 bx-py-utils
66 platformdirs
67 jaraco_itertools
68 ];
69
70 pythonImportsCheck = [ "jaraco.abode" ];
71
72 nativeCheckInputs = [
73 pytestCheckHook
74 requests-mock
75 ];
76
77 preCheck = ''
78 export HOME=$TEMP
79 '';
80
81 disabledTests = [
82 "_cookie_string"
83 "test_cookies"
84 "test_empty_cookies"
85 "test_invalid_cookies"
86 ];
87
88 meta = with lib; {
89 changelog = "https://github.com/jaraco/jaraco.abode/blob/${src.rev}/CHANGES.rst";
90 homepage = "https://github.com/jaraco/jaraco.abode";
91 description = "Library interfacing to the Abode home security system";
92 license = licenses.mit;
93 maintainers = with maintainers; [ jamiemagee dotlambda ];
94 };
95}