Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-kasa / default.nix
blob807d5d5af9a705b5ddeb859d5bd555f28aaf6ca5
1 { lib
2 , aiohttp
3 , anyio
4 , async-timeout
5 , asyncclick
6 , buildPythonPackage
7 , cryptography
8 , fetchFromGitHub
9 , kasa-crypt
10 , orjson
11 , poetry-core
12 , pydantic
13 , pytest-asyncio
14 , pytest-mock
15 , pytestCheckHook
16 , pythonOlder
17 , voluptuous
20 buildPythonPackage rec {
21   pname = "python-kasa";
22   version = "0.6.2.1";
23   pyproject = true;
25   disabled = pythonOlder "3.8";
27   src = fetchFromGitHub {
28     owner = "python-kasa";
29     repo = "python-kasa";
30     rev = "refs/tags/${version}";
31     hash = "sha256-iCqJY3qkA3ZVXTCfxvQoaZsaqGui8PwKGAmLXKZgLJs=";
32   };
34   nativeBuildInputs = [
35     poetry-core
36   ];
38   propagatedBuildInputs = [
39     aiohttp
40     anyio
41     async-timeout
42     asyncclick
43     cryptography
44     pydantic
45   ];
47   nativeCheckInputs = [
48     pytest-asyncio
49     pytest-mock
50     pytestCheckHook
51     voluptuous
52   ];
54   passthru.optional-dependencies = {
55     speedups = [
56       kasa-crypt
57       orjson
58     ];
59   };
61   pytestFlagsArray = [
62     "--asyncio-mode=auto"
63   ];
65   disabledTestPaths = [
66     # Skip the examples tests
67     "kasa/tests/test_readme_examples.py"
68   ];
70   pythonImportsCheck = [
71     "kasa"
72   ];
74   meta = with lib; {
75     description = "Python API for TP-Link Kasa Smarthome products";
76     mainProgram = "kasa";
77     homepage = "https://python-kasa.readthedocs.io/";
78     changelog = "https://github.com/python-kasa/python-kasa/blob/${version}/CHANGELOG.md";
79     license = licenses.gpl3Plus;
80     maintainers = with maintainers; [ fab ];
81   };