nixpkgs/pkgs/development/python-modules/respx/default.nix

55 lines
883 B
Nix
Raw Normal View History

2021-01-16 11:52:47 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, httpcore
, httpx
, flask
2021-01-16 11:52:47 +00:00
, pytest-asyncio
, pytestCheckHook
, starlette
2021-01-16 11:52:47 +00:00
, trio
}:
buildPythonPackage rec {
pname = "respx";
version = "0.19.1";
2021-01-16 11:52:47 +00:00
src = fetchFromGitHub {
owner = "lundberg";
repo = pname;
rev = version;
sha256 = "134h9526md242p7ql0cpknqvkpd3fhxk2vridkvswg91f532w180";
2021-01-16 11:52:47 +00:00
};
propagatedBuildInputs = [
httpx
];
2021-01-16 11:52:47 +00:00
checkInputs = [
httpcore
httpx
flask
2021-01-16 11:52:47 +00:00
pytest-asyncio
pytestCheckHook
starlette
2021-01-16 11:52:47 +00:00
trio
];
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
disabledTests = [
"test_pass_through"
];
2021-01-16 11:52:47 +00:00
pythonImportsCheck = [ "respx" ];
meta = with lib; {
description = "Python library for mocking HTTPX";
homepage = "https://lundberg.github.io/respx/";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}