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