mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
python310Packages.pyunifiprotect: init at 3.7.0
This commit is contained in:
parent
46a5513ab8
commit
12930206ab
2 changed files with 87 additions and 0 deletions
85
pkgs/development/python-modules/pyunifiprotect/default.nix
Normal file
85
pkgs/development/python-modules/pyunifiprotect/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue