2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flask,
|
|
|
|
httpcore,
|
|
|
|
httpx,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-07-27 06:49:29 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
starlette,
|
|
|
|
trio,
|
2021-01-17 00:15:33 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "respx";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.21.1";
|
|
|
|
pyproject = true;
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lundberg";
|
2024-07-27 06:49:29 +00:00
|
|
|
repo = "respx";
|
2021-01-17 00:15:33 +00:00
|
|
|
rev = version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-sBb9HPvX+AKJUMWBME381F2amYdQmBiM8OguGW3lFG0=";
|
2021-01-17 00:15:33 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/--cov/d" setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ httpx ];
|
2021-01-17 00:15:33 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-01-17 00:15:33 +00:00
|
|
|
httpcore
|
|
|
|
httpx
|
2021-08-05 21:33:18 +00:00
|
|
|
flask
|
2021-01-17 00:15:33 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
starlette
|
2021-01-17 00:15:33 +00:00
|
|
|
trio
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests = [ "test_pass_through" ];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "respx" ];
|
2021-01-17 00:15:33 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for mocking HTTPX";
|
|
|
|
homepage = "https://lundberg.github.io/respx/";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/lundberg/respx/blob/${version}/CHANGELOG.md";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = licenses.bsd3;
|
2021-01-17 00:15:33 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|