anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / pysmartthings / default.nix
blobdfcfeb1755c8af264ea6793469f1167448c4b166
2   lib,
3   aiohttp,
4   buildPythonPackage,
5   fetchFromGitHub,
6   pytest-asyncio,
7   pytestCheckHook,
8   pythonOlder,
9 }:
11 buildPythonPackage rec {
12   pname = "pysmartthings";
13   version = "0.7.8";
14   format = "setuptools";
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "andrewsayre";
20     repo = pname;
21     rev = version;
22     hash = "sha256-r+f2+vEXJdQGDlbs/MhraFgEmsAf32PU282blLRLjzc=";
23   };
25   postPatch = ''
26     substituteInPlace setup.py \
27       --replace "aiohttp>=3.8.0,<4.0.0" "aiohttp<=4.0.0"
28   '';
30   propagatedBuildInputs = [ aiohttp ];
32   # https://github.com/andrewsayre/pysmartthings/issues/80
33   doCheck = lib.versionOlder aiohttp.version "3.9.0";
35   nativeCheckInputs = [
36     pytest-asyncio
37     pytestCheckHook
38   ];
40   pythonImportsCheck = [ "pysmartthings" ];
42   meta = with lib; {
43     description = "Python library for interacting with the SmartThings cloud API";
44     homepage = "https://github.com/andrewsayre/pysmartthings";
45     changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${version}";
46     license = with licenses; [ mit ];
47     maintainers = with maintainers; [ fab ];
48   };