2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-09-18 10:52:07 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2021-09-18 10:52:07 +00:00
|
|
|
, backports_ssl_match_hostname
|
|
|
|
, brotli
|
2020-04-24 23:36:52 +00:00
|
|
|
, certifi
|
2021-09-18 10:52:07 +00:00
|
|
|
, gevent
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
2021-09-18 10:52:07 +00:00
|
|
|
, dpkt
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "geventhttpclient";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "f3c5884d62be75162426728e3d86788740b13e363b197ef592f1443dba240709";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
brotli
|
|
|
|
certifi
|
|
|
|
gevent
|
|
|
|
six
|
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
backports_ssl_match_hostname
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
dpkt
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
disabledTests = [
|
|
|
|
# socket.gaierror: [Errno -2] Name or service not known
|
|
|
|
"test_client_simple"
|
|
|
|
"test_client_without_leading_slas"
|
|
|
|
"test_request_with_headers"
|
|
|
|
"test_response_context_manager"
|
|
|
|
"test_client_ssl"
|
|
|
|
"test_ssl_fail_invalid_certificate"
|
|
|
|
"test_multi_queries_greenlet_safe"
|
|
|
|
];
|
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/gwik/geventhttpclient";
|
|
|
|
description = "HTTP client library for gevent";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|