python310Packages.pyunifiprotect: init at 3.7.0

This commit is contained in:
Fabian Affolter 2022-06-03 21:12:07 +02:00
parent 46a5513ab8
commit 12930206ab
2 changed files with 87 additions and 0 deletions

View file

@ -0,0 +1,85 @@
{ lib
, aiohttp
, aioshutil
, buildPythonPackage
, fetchFromGitHub
, packaging
, pillow
, poetry-core
, pydantic
, pyjwt
, pytest-aiohttp
, pytest-asyncio
, pytest-benchmark
, pytest-timeout
, pytest-xdist
, pytestCheckHook
, python-dotenv
, pythonOlder
, pytz
, typer
}:
buildPythonPackage rec {
pname = "pyunifiprotect";
version = "3.7.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "briis";
repo = pname;
rev = "v${version}";
hash = "sha256-0adbUKTkbgA4pKrIVFGowD4Wf8brjfkLpfCT/+Mw6vs=";
};
propagatedBuildInputs = [
aiohttp
aioshutil
packaging
pillow
pydantic
pyjwt
python-dotenv
pytz
typer
];
checkInputs = [
pytest-aiohttp
pytest-asyncio
pytest-benchmark
pytest-timeout
pytest-xdist
pytestCheckHook
];
postPatch = ''
# https://github.com/briis/pyunifiprotect/pull/176
substituteInPlace setup.cfg \
--replace "asyncio" "aiohttp"
substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" ""
'';
pythonImportsCheck = [
"pyunifiprotect"
];
pytestFlagsArray = [
"--benchmark-disable"
];
disabledTests = [
# Tests require ffprobe
"test_get_camera_video"
];
meta = with lib; {
description = "Library for interacting with the Unifi Protect API";
homepage = "https://github.com/briis/pyunifiprotect";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -8761,6 +8761,8 @@ in {
pyunifi = callPackage ../development/python-modules/pyunifi { };
pyunifiprotect = callPackage ../development/python-modules/pyunifiprotect { };
pyupdate = callPackage ../development/python-modules/pyupdate { };
pyupgrade = callPackage ../development/python-modules/pyupgrade { };