python3Packages.sanic-testing: 0.3.1 -> 0.4.0

This commit is contained in:
Fabian Affolter 2021-06-08 10:53:19 +02:00
parent efe210cec8
commit 515b0b158c

View File

@ -2,7 +2,6 @@
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pytestCheckHook , pytestCheckHook
, httpcore
, httpx , httpx
, pytest-asyncio , pytest-asyncio
, sanic , sanic
@ -11,22 +10,31 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "sanic-testing"; pname = "sanic-testing";
version = "0.3.1"; version = "0.4.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sanic-org"; owner = "sanic-org";
repo = "sanic-testing"; repo = "sanic-testing";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-hBAq+/BKs0a01M89Nb8HaClqxB+W5PTfjVzef/m9SWs="; sha256 = "0li984imqmqc001iw4m4b6cqik3d9nb4b3yvamvbwkb6hgd94sck";
}; };
postPatch = '' propagatedBuildInputs = [
substituteInPlace setup.py \ httpx
--replace 'httpx>=0.16, <0.18' 'httpx' \ sanic
--replace 'httpcore==0.12.*' 'httpcore' websockets
''; ];
propagatedBuildInputs = [ httpx sanic websockets httpcore ]; checkInputs = [
pytest-asyncio
pytestCheckHook
];
postPatch = ''
# https://github.com/sanic-org/sanic-testing/issues/19
substituteInPlace setup.py \
--replace '"websockets==8.1",' '"websockets>=9.1",'
'';
# `sanic` is explicitly set to null when building `sanic` itself # `sanic` is explicitly set to null when building `sanic` itself
# to prevent infinite recursion. In that case we skip running # to prevent infinite recursion. In that case we skip running
@ -34,7 +42,6 @@ buildPythonPackage rec {
doCheck = sanic != null; doCheck = sanic != null;
dontUsePythonImportsCheck = sanic == null; dontUsePythonImportsCheck = sanic == null;
checkInputs = [ pytestCheckHook pytest-asyncio ];
pythonImportsCheck = [ "sanic_testing" ]; pythonImportsCheck = [ "sanic_testing" ];
meta = with lib; { meta = with lib; {