depot/third_party/nixpkgs/pkgs/development/python-modules/pyenphase/default.nix
Default email 60f07311b9 Project import generated by Copybara.
GitOrigin-RevId: f8e2ebd66d097614d51a56a755450d4ae1632df1
2024-02-06 17:22:34 -08:00

75 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.19.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "pyenphase";
repo = "pyenphase";
rev = "refs/tags/v${version}";
hash = "sha256-Wj2CkOvH5mS+DaIcbrqHjK+0mG3gfyF5M9tFImeJ/ko=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=pyenphase --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
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 ];
};
}