python312Packages.python-smarttub: modernize

This commit is contained in:
Martin Weinelt 2024-11-17 21:13:57 +01:00
parent aea2b6e78b
commit 7ca2b22e03
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -10,23 +10,26 @@
pytestCheckHook,
python-dateutil,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "python-smarttub";
version = "0.0.38";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "mdz";
repo = pname;
repo = "python-smarttub";
rev = "refs/tags/v${version}";
hash = "sha256-ErGBOO5aes4Avmt2M6rkZPmjwsCMZdNnLhMDYhlULzU=";
};
propagatedBuildInputs = [
build-system = [ setuptools ];
dependencies = [
aiohttp
inflection
pyjwt
@ -39,14 +42,10 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.py \
--replace "pyjwt~=2.1.0" "pyjwt>=2.1.0"
'';
pythonImportsCheck = [ "smarttub" ];
meta = with lib; {
changelog = "https://github.com/mdz/python-smarttub/releases/tag/v${version}";
description = "Python API for SmartTub enabled hot tubs";
homepage = "https://github.com/mdz/python-smarttub";
license = with licenses; [ mit ];