1{ lib
2, aiohttp
3, aresponses
4, buildPythonPackage
5, fetchFromGitHub
6, inflection
7, pyjwt
8, pytest-asyncio
9, pytestCheckHook
10, python-dateutil
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "python-smarttub";
16 version = "0.0.33";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "mdz";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 sha256 = "sha256-BGG5SQfVxhp6ID2Ob+afm75cInVixSPD5012K4HwthU=";
26 };
27
28 propagatedBuildInputs = [
29 aiohttp
30 inflection
31 pyjwt
32 python-dateutil
33 ];
34
35 checkInputs = [
36 aresponses
37 pytest-asyncio
38 pytestCheckHook
39 ];
40
41 postPatch = ''
42 substituteInPlace setup.py \
43 --replace "pyjwt~=2.1.0" "pyjwt>=2.1.0"
44 '';
45
46 pythonImportsCheck = [
47 "smarttub"
48 ];
49
50 meta = with lib; {
51 description = "Python API for SmartTub enabled hot tubs";
52 homepage = "https://github.com/mdz/python-smarttub";
53 license = with licenses; [ mit ];
54 maintainers = with maintainers; [ fab ];
55 };
56}