5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
72 lines
1.3 KiB
Nix
72 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
awesomeversion,
|
|
buildPythonPackage,
|
|
envoy-utils,
|
|
fetchFromGitHub,
|
|
httpx,
|
|
lxml,
|
|
orjson,
|
|
poetry-core,
|
|
pyjwt,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
respx,
|
|
syrupy,
|
|
tenacity,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyenphase";
|
|
version = "1.20.3";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pyenphase";
|
|
repo = "pyenphase";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-4lMsyzw56gFimUs52mEzy5eKYF9s2ClNi3yfdIBbccY=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail " --cov=pyenphase --cov-report=term-missing:skip-covered" ""
|
|
'';
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [
|
|
awesomeversion
|
|
envoy-utils
|
|
httpx
|
|
lxml
|
|
orjson
|
|
pyjwt
|
|
tenacity
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
respx
|
|
syrupy
|
|
];
|
|
|
|
disabledTests = [
|
|
# https://github.com/pyenphase/pyenphase/issues/97
|
|
"test_with_7_x_firmware"
|
|
];
|
|
|
|
pythonImportsCheck = [ "pyenphase" ];
|
|
|
|
meta = with lib; {
|
|
description = "Library to control enphase envoy";
|
|
homepage = "https://github.com/pyenphase/pyenphase";
|
|
changelog = "https://github.com/pyenphase/pyenphase/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|