2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
brotli,
|
|
|
|
buildPythonPackage,
|
|
|
|
certifi,
|
|
|
|
dpkt,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gevent,
|
|
|
|
llhttp,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
six,
|
|
|
|
stdenv,
|
|
|
|
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-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "-m 'not network'" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "geventhttpclient" ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|