From ce7b5ac8c99d37f2d693dd1c8a3d6e3455c1eb46 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 24 May 2021 00:27:56 +0200 Subject: [PATCH] python3Packages.aioambient: allow later websockets releases --- .../python-modules/aioambient/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/aioambient/default.nix b/pkgs/development/python-modules/aioambient/default.nix index 5e504ab87a0..83c74925b8c 100644 --- a/pkgs/development/python-modules/aioambient/default.nix +++ b/pkgs/development/python-modules/aioambient/default.nix @@ -5,8 +5,8 @@ , buildPythonPackage , fetchFromGitHub , poetry-core +, pytest-aiohttp , pytest-asyncio -, pytest-cov , pytestCheckHook , python-engineio , python-socketio @@ -27,7 +27,9 @@ buildPythonPackage rec { sha256 = "sha256-uqvM5F0rpw+xeCXYl4lGMt3r0ugPsUmSvujmTJ9HABk="; }; - nativeBuildInputs = [ poetry-core ]; + nativeBuildInputs = [ + poetry-core + ]; propagatedBuildInputs = [ aiohttp @@ -39,13 +41,20 @@ buildPythonPackage rec { checkInputs = [ aresponses asynctest + pytest-aiohttp pytest-asyncio - pytest-cov pytestCheckHook ]; + postPatch = '' + # https://github.com/bachya/aioambient/pull/84 + substituteInPlace pyproject.toml \ + --replace 'websockets = "^8.1"' 'websockets = ">=8.1,<10.0"' + ''; + # Ignore the examples directory as the files are prefixed with test_ - pytestFlagsArray = [ "--ignore examples/" ]; + disabledTestPaths = [ "examples/" ]; + pythonImportsCheck = [ "aioambient" ]; meta = with lib; {