2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
certifi,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mock,
|
|
|
|
opentelemetry-api,
|
|
|
|
opentelemetry-sdk,
|
|
|
|
orjson,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-httpserver,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
respx,
|
|
|
|
setuptools,
|
|
|
|
trustme,
|
|
|
|
urllib3,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "elastic-transport";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "8.13.0";
|
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elastic";
|
|
|
|
repo = "elastic-transport-python";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-KmZCaAbzbfqbPwFuF43ckwgVhZVbPvwjF7uqPKHml9Q=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace " --cov-report=term-missing --cov=elastic_transport" ""
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
urllib3
|
|
|
|
certifi
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aiohttp
|
|
|
|
mock
|
2024-05-15 15:35:15 +00:00
|
|
|
opentelemetry-api
|
|
|
|
opentelemetry-sdk
|
|
|
|
orjson
|
2023-05-24 13:37:59 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-httpserver
|
|
|
|
pytestCheckHook
|
|
|
|
requests
|
2024-05-15 15:35:15 +00:00
|
|
|
respx
|
2023-05-24 13:37:59 +00:00
|
|
|
trustme
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "elastic_transport" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"fingerprint"
|
|
|
|
"ssl"
|
|
|
|
"test_custom_headers"
|
|
|
|
"test_custom_user_agent"
|
|
|
|
"test_default_headers"
|
|
|
|
"test_head"
|
|
|
|
"tls"
|
2023-07-15 17:15:38 +00:00
|
|
|
"test_simple_request"
|
|
|
|
"test_node"
|
|
|
|
"test_debug_logging"
|
|
|
|
"test_debug_logging_uncompressed_body"
|
|
|
|
"test_debug_logging_no_body"
|
|
|
|
"test_httpbin"
|
|
|
|
"test_sniffed_nodes_added_to_pool"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Transport classes and utilities shared among Python Elastic client libraries";
|
|
|
|
homepage = "https://github.com/elasticsearch/elastic-transport-python";
|
|
|
|
changelog = "https://github.com/elastic/elastic-transport-python/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|