Martin Weinelt
2025-03-05 23:03:35 +01:00
parent 6e1f5fc925
commit 410d05c41a
@@ -1,40 +1,51 @@
{
lib,
aiohttp,
aioresponses,
aiosseclient,
buildPythonPackage,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
syrupy,
yarl,
}:
buildPythonPackage rec {
pname = "pysmartthings";
version = "0.7.8";
format = "setuptools";
version = "2.5.0";
pyproject = true;
disabled = pythonOlder "3.8";
disabled = pythonOlder "3.12";
src = fetchFromGitHub {
owner = "andrewsayre";
repo = pname;
rev = version;
hash = "sha256-r+f2+vEXJdQGDlbs/MhraFgEmsAf32PU282blLRLjzc=";
repo = "pysmartthings";
rev = "v${version}";
hash = "sha256-0D0si3VBGtnQ8+kUKiquPo/IJXeBgR7SFc/1nxhiPvw=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "aiohttp>=3.8.0,<4.0.0" "aiohttp<=4.0.0"
'';
build-system = [ poetry-core ];
propagatedBuildInputs = [ aiohttp ];
# https://github.com/andrewsayre/pysmartthings/issues/80
doCheck = lib.versionOlder aiohttp.version "3.9.0";
dependencies = [
aiohttp
aiosseclient
mashumaro
orjson
yarl
];
nativeCheckInputs = [
aioresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "pysmartthings" ];
@@ -42,7 +53,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python library for interacting with the SmartThings cloud API";
homepage = "https://github.com/andrewsayre/pysmartthings";
changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/${version}";
changelog = "https://github.com/andrewsayre/pysmartthings/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};