aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/httpcore/default.nix
blob: aa15c2555e679219bc26720a92bb956f8ea9c21e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, h11
, h2
, pproxy
, pytestCheckHook
, pytestcov
, sniffio
, uvicorn
}:

buildPythonPackage rec {
  pname = "httpcore";
  version = "0.12.0";
  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "encode";
    repo = pname;
    rev = version;
    sha256 = "0bwxn7m7r7h6k41swxj0jqj3nzi76wqxwbnry6y7d4qfh4m26g2j";
  };

  propagatedBuildInputs = [
    h11
    h2
    sniffio
  ];

  checkInputs = [
    pproxy
    pytestCheckHook
    pytestcov
    uvicorn
  ];

  pytestFlagsArray = [
    # these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known
    "--ignore=tests/sync_tests/test_interfaces.py"
  ];

  pythonImportsCheck = [ "httpcore" ];

  meta = with lib; {
    description = "A minimal low-level HTTP client";
    homepage = "https://github.com/encode/httpcore";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ris ];
  };
}