anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / python-kasa / default.nix
blob796b3e601f383e12b23dfe4c5c2de166b68f457b
2   lib,
3   aiohttp,
4   async-timeout,
5   asyncclick,
6   buildPythonPackage,
7   cryptography,
8   fetchFromGitHub,
9   hatchling,
10   kasa-crypt,
11   orjson,
12   ptpython,
13   pydantic,
14   pytest-asyncio,
15   pytest-freezer,
16   pytest-mock,
17   pytest-socket,
18   pytestCheckHook,
19   pythonOlder,
20   rich,
21   voluptuous,
24 buildPythonPackage rec {
25   pname = "python-kasa";
26   version = "0.7.7";
27   pyproject = true;
29   disabled = pythonOlder "3.9";
31   src = fetchFromGitHub {
32     owner = "python-kasa";
33     repo = "python-kasa";
34     rev = "refs/tags/${version}";
35     hash = "sha256-405FrKG1jZNrxTmz/K8vqwPhiOqrxURWVCpyFQRJeXc=";
36   };
38   build-system = [ hatchling ];
40   dependencies = [
41     aiohttp
42     async-timeout
43     asyncclick
44     cryptography
45     pydantic
46   ];
48   nativeCheckInputs = [
49     pytest-asyncio
50     pytest-freezer
51     pytest-mock
52     pytest-socket
53     pytestCheckHook
54     voluptuous
55   ];
57   optional-dependencies = {
58     shell = [
59       ptpython
60       rich
61     ];
62     speedups = [
63       kasa-crypt
64       orjson
65     ];
66   };
68   pytestFlagsArray = [ "--asyncio-mode=auto" ];
70   disabledTestPaths = [
71     # Skip the examples tests
72     "kasa/tests/test_readme_examples.py"
73   ];
75   pythonImportsCheck = [ "kasa" ];
77   meta = with lib; {
78     description = "Python API for TP-Link Kasa Smarthome products";
79     homepage = "https://python-kasa.readthedocs.io/";
80     changelog = "https://github.com/python-kasa/python-kasa/blob/${version}/CHANGELOG.md";
81     license = licenses.gpl3Plus;
82     maintainers = with maintainers; [ fab ];
83     mainProgram = "kasa";
84   };