python3Packages.growattserver: init at 1.0.1

This commit is contained in:
Fabian Affolter 2021-05-16 01:44:37 +02:00 committed by Martin Weinelt
parent d497487aca
commit 5f16f26d93
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,42 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, requests
}:
buildPythonPackage rec {
pname = "growattserver";
version = "1.0.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "indykoning";
repo = "PyPi_GrowattServer";
rev = version;
sha256 = "1vgb92axlz1kkszmamjbsqgi74afnbr2mc1np3pmbn3bx5rmk1d9";
};
propagatedBuildInputs = [
requests
];
postPatch = ''
# https://github.com/indykoning/PyPi_GrowattServer/issues/2
substituteInPlace setup.py \
--replace "tag = os.environ['LATEST_TAG']" "" \
--replace "version=tag," 'version="${version}",'
'';
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "growattServer" ];
meta = with lib; {
description = "Python package to retrieve information from Growatt units";
homepage = "https://github.com/indykoning/PyPi_GrowattServer";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -3019,6 +3019,8 @@ in {
gremlinpython = callPackage ../development/python-modules/gremlinpython { };
growattserver = callPackage ../development/python-modules/growattserver { };
grip = callPackage ../development/python-modules/grip { };
grpc_google_iam_v1 = callPackage ../development/python-modules/grpc_google_iam_v1 { };