2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
certifi,
|
|
|
|
click,
|
|
|
|
ecs-logging,
|
|
|
|
elastic-transport,
|
|
|
|
elasticsearch8,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
mock,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
six,
|
|
|
|
voluptuous,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "es-client";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "8.13.1";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "untergeek";
|
|
|
|
repo = "es_client";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-4v9SRWVG9p4kCob4C3by2JxNqX6L3yMHpbnMYEAM7A0=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ hatchling ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2023-05-24 13:37:59 +00:00
|
|
|
certifi
|
|
|
|
click
|
2024-02-07 01:22:34 +00:00
|
|
|
ecs-logging
|
2023-05-24 13:37:59 +00:00
|
|
|
elastic-transport
|
|
|
|
elasticsearch8
|
|
|
|
pyyaml
|
|
|
|
six
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
mock
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "es_client" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_bad_version_raises"
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_basic_operation"
|
|
|
|
"test_basic_operation"
|
2023-05-24 13:37:59 +00:00
|
|
|
"test_client_info"
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_logging_options_ecs"
|
|
|
|
"test_logging_options_json"
|
2023-05-24 13:37:59 +00:00
|
|
|
"test_multiple_hosts_raises"
|
|
|
|
"test_non_dict_passed"
|
|
|
|
"test_skip_version_check"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module for building Elasticsearch client objects";
|
|
|
|
homepage = "https://github.com/untergeek/es_client";
|
|
|
|
changelog = "https://github.com/untergeek/es_client/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|