2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
incremental,
|
|
|
|
setuptools,
|
|
|
|
|
|
|
|
# dependenices
|
|
|
|
attrs,
|
|
|
|
hyperlink,
|
|
|
|
requests,
|
|
|
|
twisted,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
httpbin,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "treq";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "23.11.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-CRT/kp/RYyzhZ5cjUmD4vBnSD/fEWcHeq9ZbjGjL6sU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
incremental
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
attrs
|
|
|
|
hyperlink
|
2020-04-24 23:36:52 +00:00
|
|
|
incremental
|
2024-01-13 08:15:51 +00:00
|
|
|
requests
|
2020-04-24 23:36:52 +00:00
|
|
|
twisted
|
2022-06-16 17:23:12 +00:00
|
|
|
] ++ twisted.optional-dependencies.tls;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
httpbin
|
2022-05-18 14:49:53 +00:00
|
|
|
twisted
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2024-01-13 08:15:51 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
trial treq
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/twisted/treq";
|
2022-05-18 14:49:53 +00:00
|
|
|
description = "Requests-like API built on top of twisted.web's Agent";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|