2021-08-18 13:19:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-httpserver
|
2021-08-18 13:19:15 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2023-05-24 13:37:59 +00:00
|
|
|
, pyyaml
|
2021-08-18 13:19:15 +00:00
|
|
|
, requests
|
2023-05-24 13:37:59 +00:00
|
|
|
, tomli
|
|
|
|
, tomli-w
|
|
|
|
, types-pyyaml
|
2022-12-17 10:02:37 +00:00
|
|
|
, types-toml
|
|
|
|
, typing-extensions
|
2021-08-18 13:19:15 +00:00
|
|
|
, urllib3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "responses";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.23.1";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "getsentry";
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-BU90nUZVqowFMn78KfbBEf59X7Q/1itvkGFdOzy4D2c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
pyyaml
|
2021-08-18 13:19:15 +00:00
|
|
|
requests
|
2023-05-24 13:37:59 +00:00
|
|
|
types-pyyaml
|
2022-12-17 10:02:37 +00:00
|
|
|
types-toml
|
2022-02-10 20:34:41 +00:00
|
|
|
urllib3
|
2022-12-17 10:02:37 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
2021-08-18 13:19:15 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-httpserver
|
2021-08-18 13:19:15 +00:00
|
|
|
pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
tomli-w
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
2021-08-18 13:19:15 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"responses"
|
|
|
|
];
|
2021-08-18 13:19:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for mocking out the requests Python library";
|
|
|
|
homepage = "https://github.com/getsentry/responses";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/getsentry/responses/blob/${version}/CHANGES";
|
2021-08-18 13:19:15 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|