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