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-10-04 16:56:33 +00:00
|
|
|
version = "24.9.1";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-Fdp/xATz5O1Z0Kvl+O70lm+rvmGAOaKiO8fBUwXO/qg=";
|
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;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|