1{ stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, isPy27
5, h11
6, sniffio
7}:
8
9buildPythonPackage rec {
10 pname = "httpcore";
11 version = "0.10.2";
12 disabled = isPy27;
13
14 src = fetchFromGitHub {
15 owner = "encode";
16 repo = pname;
17 rev = version;
18 sha256 = "00gn8nfv814rg6fj7xv97mrra3fvx6fzjcgx9y051ihm6hxljdsi";
19 };
20
21 propagatedBuildInputs = [ h11 sniffio ];
22
23 # tests require pythonic access to mitmproxy, which isn't (yet?) packaged as
24 # a pythonPackage.
25 doCheck = false;
26 pythonImportsCheck = [ "httpcore" ];
27
28 meta = with stdenv.lib; {
29 description = "A minimal HTTP client";
30 homepage = "https://github.com/encode/httpcore";
31 license = licenses.bsd3;
32 maintainers = [ maintainers.ris ];
33 };
34}