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 , pytz
, termcolor , termcolor
, typer , typer
, ffmpeg
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -38,6 +39,13 @@ buildPythonPackage rec {
hash = "sha256-q6fzP1wauwnRUByGc+EQ/vNJgoCWx22Qh2uZeUF4Abk="; hash = "sha256-q6fzP1wauwnRUByGc+EQ/vNJgoCWx22Qh2uZeUF4Abk=";
}; };
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" ""
substituteInPlace setup.cfg \
--replace "pydantic!=1.9.1" "pydantic"
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
aiofiles aiofiles
aiohttp aiohttp
@ -60,6 +68,7 @@ buildPythonPackage rec {
}; };
checkInputs = [ checkInputs = [
ffmpeg # Required for command ffprobe
pytest-aiohttp pytest-aiohttp
pytest-asyncio pytest-asyncio
pytest-benchmark pytest-benchmark
@ -68,13 +77,6 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" ""
substituteInPlace setup.cfg \
--replace "pydantic!=1.9.1" "pydantic"
'';
pythonImportsCheck = [ pythonImportsCheck = [
"pyunifiprotect" "pyunifiprotect"
]; ];
@ -83,11 +85,6 @@ buildPythonPackage rec {
"--benchmark-disable" "--benchmark-disable"
]; ];
disabledTests = [
# Tests require ffprobe
"test_get_camera_video"
];
meta = with lib; { meta = with lib; {
description = "Library for interacting with the Unifi Protect API"; description = "Library for interacting with the Unifi Protect API";
homepage = "https://github.com/briis/pyunifiprotect"; homepage = "https://github.com/briis/pyunifiprotect";