about summary refs log tree commit diff
path: root/pkgs/development/python-modules/geventhttpclient/default.nix
blob: 5563ff94baf5620b65ddf19c37d09f6f5604bd38 (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, gevent
, certifi
, six
, backports_ssl_match_hostname
, pythonOlder
}:

buildPythonPackage rec {
  pname = "geventhttpclient";
  version = "1.4.5";

  src = fetchPypi {
    inherit pname version;
    sha256 = "3f0ab18d84ef26ba0c9df73ae2a41ba30a46072b447f2e36c740400de4a63d44";
  };

  buildInputs = [ pytest ];
  propagatedBuildInputs = [ gevent certifi six ]
    ++ lib.optionals (pythonOlder "3.7") [ backports_ssl_match_hostname ];

  # Several tests fail that require network
  doCheck = false;
  checkPhase = ''
    py.test $out
  '';

  meta = with lib; {
    homepage = "https://github.com/gwik/geventhttpclient";
    description = "HTTP client library for gevent";
    license = licenses.mit;
    maintainers = with maintainers; [ koral ];
  };

}