2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, gevent
|
|
|
|
, certifi
|
|
|
|
, six
|
|
|
|
, backports_ssl_match_hostname
|
2021-03-19 17:17:44 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "geventhttpclient";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "1.4.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "3f0ab18d84ef26ba0c9df73ae2a41ba30a46072b447f2e36c740400de4a63d44";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ pytest ];
|
2021-03-19 17:17:44 +00:00
|
|
|
propagatedBuildInputs = [ gevent certifi six ]
|
|
|
|
++ lib.optionals (pythonOlder "3.7") [ backports_ssl_match_hostname ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Several tests fail that require network
|
|
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
|
|
py.test $out
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/gwik/geventhttpclient";
|
|
|
|
description = "HTTP client library for gevent";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|