python310Packages.pyunifiprotect: handle optional dependencies

This commit is contained in:
Fabian Affolter 2022-06-04 13:15:12 +02:00 committed by GitHub
parent d88f472124
commit a9853d7a0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@
, aioshutil
, buildPythonPackage
, fetchFromGitHub
, ipython
, packaging
, pillow
, poetry-core
@ -17,6 +18,7 @@
, python-dotenv
, pythonOlder
, pytz
, termcolor
, typer
}:
@ -41,11 +43,18 @@ buildPythonPackage rec {
pillow
pydantic
pyjwt
python-dotenv
pytz
typer
];
passthru.optional-dependencies = {
shell = [
ipython
python-dotenv
termcolor
];
};
checkInputs = [
pytest-aiohttp
pytest-asyncio
@ -56,9 +65,6 @@ buildPythonPackage rec {
];
postPatch = ''
# https://github.com/briis/pyunifiprotect/pull/176
substituteInPlace setup.cfg \
--replace "asyncio" "aiohttp"
substituteInPlace pyproject.toml \
--replace "--cov=pyunifiprotect --cov-append" ""
'';