1{
2 lib,
3 brotli,
4 buildPythonPackage,
5 certifi,
6 dpkt,
7 fetchFromGitHub,
8 gevent,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12 stdenv,
13 urllib3,
14}:
15
16buildPythonPackage rec {
17 pname = "geventhttpclient";
18 version = "2.3.4";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "geventhttpclient";
25 repo = "geventhttpclient";
26 tag = version;
27 # TODO: unvendor llhttp
28 fetchSubmodules = true;
29 hash = "sha256-X85co03fMG7OSpkL02n3ektRNzu7oHChtwZzkspsSTk=";
30 };
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 brotli
36 certifi
37 gevent
38 urllib3
39 ];
40
41 nativeCheckInputs = [
42 dpkt
43 pytestCheckHook
44 ];
45
46 # lots of: [Errno 48] Address already in use: ('127.0.0.1', 54323)
47 doCheck = !stdenv.hostPlatform.isDarwin;
48
49 __darwinAllowLocalNetworking = true;
50
51 disabledTestMarks = [ "network" ];
52
53 pythonImportsCheck = [ "geventhttpclient" ];
54
55 meta = with lib; {
56 homepage = "https://github.com/geventhttpclient/geventhttpclient";
57 description = "High performance, concurrent HTTP client library using gevent";
58 changelog = "https://github.com/geventhttpclient/geventhttpclient/releases/tag/${src.tag}";
59 license = licenses.mit;
60 maintainers = with maintainers; [ koral ];
61 };
62}