2021-08-18 13:19:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchpatch2
|
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
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
2023-05-24 13:37:59 +00:00
|
|
|
, tomli
|
|
|
|
, tomli-w
|
|
|
|
, types-pyyaml
|
2022-12-17 10:02:37 +00:00
|
|
|
, types-toml
|
2021-08-18 13:19:15 +00:00
|
|
|
, urllib3
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "responses";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.25.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-FHtuZ6NUmCveAJOXEajfTLRMR8W1Jz/pjFKdE6PHW2g=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
# adds missing pytest asyncio markers
|
|
|
|
url = "https://github.com/getsentry/responses/commit/d5e7402f1782692d04742562370abaca8d54a972.patch";
|
|
|
|
hash = "sha256-A/DYSKvuangolkcQX4k/uom//AQ9in7BsTmVtlCqmXQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
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
|
2021-08-18 13:19:15 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +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
|
|
|
}
|