depot/third_party/nixpkgs/pkgs/development/python-modules/respx/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

59 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
flask,
httpcore,
httpx,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
setuptools,
starlette,
trio,
}:
buildPythonPackage rec {
pname = "respx";
version = "0.21.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "lundberg";
repo = "respx";
rev = version;
hash = "sha256-sBb9HPvX+AKJUMWBME381F2amYdQmBiM8OguGW3lFG0=";
};
postPatch = ''
sed -i "/--cov/d" setup.cfg
'';
build-system = [ setuptools ];
dependencies = [ httpx ];
nativeCheckInputs = [
httpcore
httpx
flask
pytest-asyncio
pytestCheckHook
starlette
trio
];
disabledTests = [ "test_pass_through" ];
pythonImportsCheck = [ "respx" ];
meta = with lib; {
description = "Python library for mocking HTTPX";
homepage = "https://lundberg.github.io/respx/";
changelog = "https://github.com/lundberg/respx/blob/${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}