2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-09-18 10:52:07 +00:00
|
|
|
, brotli
|
2022-02-10 20:34:41 +00:00
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, certifi
|
2021-09-18 10:52:07 +00:00
|
|
|
, dpkt
|
2024-05-15 15:35:15 +00:00
|
|
|
, fetchFromGitHub
|
2022-02-10 20:34:41 +00:00
|
|
|
, gevent
|
2024-05-15 15:35:15 +00:00
|
|
|
, llhttp
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytestCheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
2024-05-15 15:35:15 +00:00
|
|
|
, setuptools
|
2022-02-10 20:34:41 +00:00
|
|
|
, six
|
2023-10-09 19:29:22 +00:00
|
|
|
, stdenv
|
2022-08-12 12:06:08 +00:00
|
|
|
, urllib3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "geventhttpclient";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.3.1";
|
|
|
|
pyproject = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "geventhttpclient";
|
|
|
|
repo = "geventhttpclient";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
# TODO: unvendor llhttp
|
|
|
|
fetchSubmodules = true;
|
|
|
|
hash = "sha256-uOGnwPbvTam14SFTUT0UrwxHfP4a5cn3a7EhLoGBUrA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-09-18 10:52:07 +00:00
|
|
|
brotli
|
|
|
|
certifi
|
|
|
|
gevent
|
2024-05-15 15:35:15 +00:00
|
|
|
urllib3
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
dpkt
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# lots of: [Errno 48] Address already in use: ('127.0.0.1', 54323)
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
preCheck = ''
|
|
|
|
rm -rf geventhttpclient
|
|
|
|
'';
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not network'"
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"geventhttpclient"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://github.com/geventhttpclient/geventhttpclient";
|
|
|
|
description = "High performance, concurrent HTTP client library using gevent";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/geventhttpclient/geventhttpclient/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ koral ];
|
|
|
|
};
|
|
|
|
}
|