depot/third_party/nixpkgs/pkgs/development/python-modules/responses/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

65 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-asyncio
, pytest-httpserver
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, tomli
, tomli-w
, types-pyyaml
, types-toml
, typing-extensions
, urllib3
}:
buildPythonPackage rec {
pname = "responses";
version = "0.23.1";
format = "setuptools";
disabled = pythonOlder "3.7";
__darwinAllowLocalNetworking = true;
src = fetchFromGitHub {
owner = "getsentry";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-BU90nUZVqowFMn78KfbBEf59X7Q/1itvkGFdOzy4D2c=";
};
propagatedBuildInputs = [
pyyaml
requests
types-pyyaml
types-toml
urllib3
] ++ lib.optionals (pythonOlder "3.8") [
typing-extensions
];
nativeCheckInputs = [
pytest-asyncio
pytest-httpserver
pytestCheckHook
tomli-w
] ++ lib.optionals (pythonOlder "3.11") [
tomli
];
pythonImportsCheck = [
"responses"
];
meta = with lib; {
description = "Python module for mocking out the requests Python library";
homepage = "https://github.com/getsentry/responses";
changelog = "https://github.com/getsentry/responses/blob/${version}/CHANGES";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}