python3Packages.uvicorn: fix dependencies

This commit is contained in:
Martin Weinelt 2022-07-24 14:12:44 +02:00
parent 21a6aafb7d
commit 429d234f63
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 17 additions and 7 deletions

View file

@ -9,9 +9,8 @@
, pyyaml
, typing-extensions
, uvloop
, watchgod
, watchfiles
, websockets
, wsproto
, pythonOlder
}:
@ -35,15 +34,17 @@ buildPythonPackage rec {
propagatedBuildInputs = [
click
h11
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
passthru.optional-dependencies.standard = [
httptools
python-dotenv
pyyaml
uvloop
watchgod
watchfiles
websockets
wsproto
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
postInstall = ''

View file

@ -1,5 +1,6 @@
{ stdenv
, buildPythonPackage
, asgiref
, uvicorn
, httpx
, pytest-asyncio
@ -7,6 +8,8 @@
, pytest-mock
, requests
, trustme
, watchgod
, wsproto
}:
buildPythonPackage rec {
@ -19,6 +22,7 @@ buildPythonPackage rec {
dontInstall = true;
checkInputs = [
asgiref
uvicorn
httpx
pytestCheckHook
@ -26,7 +30,12 @@ buildPythonPackage rec {
pytest-mock
requests
trustme
];
# strictly optional dependencies
watchgod
wsproto
]
++ uvicorn.optional-dependencies.standard;
doCheck = !stdenv.isDarwin;