Merge pull request #183939 from onny/pyunifiprotect

This commit is contained in:
Sandro 2022-08-28 23:40:57 +02:00 committed by GitHub
commit 0832fa6632
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,7 @@
, pytz
, termcolor
, typer
, ffmpeg
}:
buildPythonPackage rec {
@ -38,6 +39,13 @@ buildPythonPackage rec {
hash = "sha256-q6fzP1wauwnRUByGc+EQ/vNJgoCWx22Qh2uZeUF4Abk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" ""
substituteInPlace setup.cfg \
--replace "pydantic!=1.9.1" "pydantic"
'';
propagatedBuildInputs = [
aiofiles
aiohttp
@ -60,6 +68,7 @@ buildPythonPackage rec {
};
checkInputs = [
ffmpeg # Required for command ffprobe
pytest-aiohttp
pytest-asyncio
pytest-benchmark
@ -68,13 +77,6 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" ""
substituteInPlace setup.cfg \
--replace "pydantic!=1.9.1" "pydantic"
'';
pythonImportsCheck = [
"pyunifiprotect"
];
@ -83,11 +85,6 @@ buildPythonPackage rec {
"--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";