Merge pull request #281790 from fabaff/pyosoenergyapi

python311Packages.pyosohotwaterapi: init at 1.1.4
This commit is contained in:
Fabian Affolter 2024-01-19 15:56:22 +01:00 committed by GitHub
commit 8b73538132
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,63 @@
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, loguru
, numpy
, pythonOlder
, setuptools
, unasync
, urllib3
}:
buildPythonPackage rec {
pname = "pyosohotwaterapi";
version = "1.1.4";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "osohotwateriot";
repo = "apyosohotwaterapi";
rev = "refs/tags/${version}";
hash = "sha256-7FLGmmndrFqSl4oC8QFIYNlFJPr+xbiZG5ZRt4vx8+s=";
};
postPatch = ''
# https://github.com/osohotwateriot/apyosohotwaterapi/pull/3
substituteInPlace requirements.txt \
--replace "pre-commit" ""
'';
nativeBuildInputs = [
setuptools
unasync
];
propagatedBuildInputs = [
aiohttp
loguru
numpy
urllib3
];
preBuild = ''
export HOME=$(mktemp -d)
'';
# Module has no tests
doCheck = false;
pythonImportsCheck = [
"apyosoenergyapi"
];
meta = with lib; {
description = "Module for using the OSO Hotwater API";
homepage = "https://github.com/osohotwateriot/apyosohotwaterapi";
changelog = "https://github.com/osohotwateriot/apyosohotwaterapi/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -10932,6 +10932,8 @@ self: super: with self; {
inherit (pkgs) lz4;
};
pyosohotwaterapi = callPackage ../development/python-modules/pyosohotwaterapi { };
pyotgw = callPackage ../development/python-modules/pyotgw { };
pyotp = callPackage ../development/python-modules/pyotp { };