depot/third_party/nixpkgs/pkgs/development/python-modules/pyenphase/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

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.21.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "pyenphase";
repo = "pyenphase";
rev = "refs/tags/v${version}";
hash = "sha256-ZMua6mBedMdTBed/mDoK9h3HXbyf+3/Uo6CZJMxBlf0=";
};
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 ];
};
}