From 429d234f636b5122fa5173e5f35b0e6c83eeec7c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 24 Jul 2022 14:12:44 +0200 Subject: [PATCH] python3Packages.uvicorn: fix dependencies --- pkgs/development/python-modules/uvicorn/default.nix | 13 +++++++------ pkgs/development/python-modules/uvicorn/tests.nix | 11 ++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/uvicorn/default.nix b/pkgs/development/python-modules/uvicorn/default.nix index e8b2520393ca..26d23f08afa4 100644 --- a/pkgs/development/python-modules/uvicorn/default.nix +++ b/pkgs/development/python-modules/uvicorn/default.nix @@ -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 = '' diff --git a/pkgs/development/python-modules/uvicorn/tests.nix b/pkgs/development/python-modules/uvicorn/tests.nix index 2fc0e932b8e9..b9cd883f43c0 100644 --- a/pkgs/development/python-modules/uvicorn/tests.nix +++ b/pkgs/development/python-modules/uvicorn/tests.nix @@ -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;