1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, httpcore
5, httpx
6, flask
7, pytest-asyncio
8, pytestCheckHook
9, starlette
10, trio
11}:
12
13buildPythonPackage rec {
14 pname = "respx";
15 version = "0.17.1";
16
17 src = fetchFromGitHub {
18 owner = "lundberg";
19 repo = pname;
20 rev = version;
21 sha256 = "0w8idh6l2iq04ydz7r2qisq9jsxq8wszkx97kx4g3yjwg4ypvc6k";
22 };
23
24 propagatedBuildInputs = [
25 httpx
26 ];
27
28 checkInputs = [
29 httpcore
30 httpx
31 flask
32 pytest-asyncio
33 pytestCheckHook
34 starlette
35 trio
36 ];
37
38 postPatch = ''
39 sed -i "/--cov/d" setup.cfg
40 '';
41
42 disabledTests = [
43 "test_pass_through"
44 ];
45
46 pythonImportsCheck = [ "respx" ];
47
48 meta = with lib; {
49 description = "Python library for mocking HTTPX";
50 homepage = "https://lundberg.github.io/respx/";
51 license = with licenses; [ bsd3 ];
52 maintainers = with maintainers; [ fab ];
53 };
54}