1{ lib
2, brotli
3, buildPythonPackage
4, certifi
5, dpkt
6, fetchPypi
7, gevent
8, pytestCheckHook
9, pythonOlder
10, six
11, stdenv
12, urllib3
13}:
14
15buildPythonPackage rec {
16 pname = "geventhttpclient";
17 version = "2.0.10";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-t8l7JlEZV6NqiU7FRlHAiJCmnhGLaXVfjnS/w3xjORs=";
25 };
26
27 propagatedBuildInputs = [
28 brotli
29 certifi
30 gevent
31 six
32 ];
33
34 nativeCheckInputs = [
35 dpkt
36 pytestCheckHook
37 urllib3
38 ];
39
40 # lots of: [Errno 48] Address already in use: ('127.0.0.1', 54323)
41 doCheck = !stdenv.isDarwin;
42
43 __darwinAllowLocalNetworking = true;
44
45 disabledTests = [
46 # socket.gaierror: [Errno -3] Temporary failure in name resolution
47 "test_client_simple"
48 "test_client_without_leading_slas"
49 "test_request_with_headers"
50 "test_response_context_manager"
51 "test_client_ssl"
52 "test_ssl_fail_invalid_certificate"
53 "test_multi_queries_greenlet_safe"
54 ];
55
56 pythonImportsCheck = [
57 "geventhttpclient"
58 ];
59
60 meta = with lib; {
61 homepage = "https://github.com/geventhttpclient/geventhttpclient";
62 description = "High performance, concurrent HTTP client library using gevent";
63 changelog = "https://github.com/geventhttpclient/geventhttpclient/releases/tag/${version}";
64 license = licenses.mit;
65 maintainers = with maintainers; [ koral ];
66 };
67}