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