Fabian Affolter 2023-12-08 09:47:26 +01:00
parent 0a03b4a767
commit eb7bb44d1b

View File

@ -2,9 +2,13 @@
, aiofiles , aiofiles
, aiohttp , aiohttp
, aioshutil , aioshutil
, async-timeout
, buildPythonPackage , buildPythonPackage
, dateparser , dateparser
, fetchFromGitHub , fetchFromGitHub
, ffmpeg
, hatch-vcs
, hatchling
, ipython , ipython
, orjson , orjson
, packaging , packaging
@ -22,37 +26,34 @@
, python-dotenv , python-dotenv
, pythonOlder , pythonOlder
, pytz , pytz
, setuptools
, setuptools-scm
, termcolor , termcolor
, typer , typer
, ffmpeg
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyunifiprotect"; pname = "pyunifiprotect";
version = "4.21.0"; version = "4.22.0";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "briis"; owner = "briis";
repo = pname; repo = "pyunifiprotect";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-BFcICpWq0aBjEww9EuO6UH8oGX8fufernFqh/gihIrM="; hash = "sha256-qzom1mLTfP683GCYlUav/MlOkYj+AiEe13b74ceW7gI=";
}; };
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
postPatch = '' postPatch = ''
substituteInPlace pyproject.toml \ substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" "" --replace "--strict-markers -ra -Wd --ignore=.* --no-cov-on-fail --cov=pyunifiprotect --cov-append --maxfail=10 -n=auto" ""
''; '';
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [ nativeBuildInputs = [
setuptools hatch-vcs
setuptools-scm hatchling
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -67,7 +68,10 @@ buildPythonPackage rec {
pyjwt pyjwt
pytz pytz
typer typer
] ++ typer.optional-dependencies.all; ] ++ typer.optional-dependencies.all
++ lib.optionals (pythonOlder "3.11") [
async-timeout
];
passthru.optional-dependencies = { passthru.optional-dependencies = {
shell = [ shell = [