mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
python3Packages.sanic-testing: 0.3.1 -> 0.4.0
This commit is contained in:
parent
efe210cec8
commit
515b0b158c
@ -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; {
|
||||
|
Loading…
Reference in New Issue
Block a user