1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 pytestCheckHook,
7 requests,
8 segno,
9}:
10
11buildPythonPackage rec {
12 pname = "fritzconnection";
13 version = "1.13.2";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "kbr";
20 repo = pname;
21 rev = "refs/tags/${version}";
22 hash = "sha256-nWXtXhF2pUBxHdrivi4DA7+bFiZPyxb2nqsiN3j4HdI=";
23 };
24
25 propagatedBuildInputs = [ requests ];
26
27 passthru.optional-dependencies = {
28 qr = [ segno ];
29 };
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 preCheck = ''
34 export HOME=$TEMP
35 '';
36
37 pythonImportsCheck = [ "fritzconnection" ];
38
39 disabledTestPaths = [
40 # Functional tests require network access
41 "fritzconnection/tests/test_functional.py"
42 ];
43
44 meta = with lib; {
45 description = "Python module to communicate with the AVM Fritz!Box";
46 homepage = "https://github.com/kbr/fritzconnection";
47 changelog = "https://fritzconnection.readthedocs.io/en/${version}/sources/version_history.html";
48 license = licenses.mit;
49 maintainers = with maintainers; [
50 dotlambda
51 valodim
52 ];
53 };
54}