1{ lib
2, async-timeout
3, buildPythonPackage
4, cryptography
5, fetchFromGitHub
6, pytest-asyncio
7, pytest-timeout
8, pytestCheckHook
9, pythonOlder
10, setuptools
11}:
12
13buildPythonPackage rec {
14 pname = "pylutron-caseta";
15 version = "0.18.3";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "gurumitts";
22 repo = pname;
23 rev = "refs/tags/v${version}";
24 hash = "sha256-tjmMu7LUne+hLLTXGqHhci9/PZiuQ10mQaARvL2sdIM=";
25 };
26
27 nativeBuildInputs = [
28 setuptools
29 ];
30
31 propagatedBuildInputs = [
32 cryptography
33 ];
34
35 nativeCheckInputs = [
36 pytest-asyncio
37 pytest-timeout
38 pytestCheckHook
39 ] ++ lib.optionals (pythonOlder "3.11") [
40 async-timeout
41 ];
42
43 pytestFlagsArray = [
44 "--asyncio-mode=auto"
45 ];
46
47 pythonImportsCheck = [
48 "pylutron_caseta"
49 ];
50
51 meta = with lib; {
52 description = "Python module o control Lutron Caseta devices";
53 homepage = "https://github.com/gurumitts/pylutron-caseta";
54 changelog = "https://github.com/gurumitts/pylutron-caseta/blob/v${version}/CHANGELOG.md";
55 license = with licenses; [ asl20 ];
56 maintainers = with maintainers; [ fab ];
57 };
58}