Merge pull request #228925 from fabaff/elasticsearch8

python310Packages.elastic-transport: init at 8.4.0, python310Packages.elastisearch8: init at 8.7.0, python310Packages.es-client: init at 8.7.0
This commit is contained in:
Fabian Affolter 2023-05-01 11:35:54 +02:00 committed by GitHub
commit fc3a477c70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 205 additions and 0 deletions

View file

@ -0,0 +1,72 @@
{ lib
, aiohttp
, buildPythonPackage
, certifi
, fetchFromGitHub
, mock
, pytest-asyncio
, pytest-httpserver
, pytestCheckHook
, pythonOlder
, requests
, trustme
, urllib3
}:
buildPythonPackage rec {
pname = "elastic-transport";
version = "8.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "elastic";
repo = "elastic-transport-python";
rev = "refs/tags/v${version}";
hash = "sha256-rZdl2gjY5Yg2Ls777tj12pPATMn//xVvEM4wkrZ3qUY=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace " --cov-report=term-missing --cov=elastic_transport" ""
'';
propagatedBuildInputs = [
urllib3
certifi
];
nativeCheckInputs = [
aiohttp
mock
pytest-asyncio
pytest-httpserver
pytestCheckHook
requests
trustme
];
pythonImportsCheck = [
"elastic_transport"
];
disabledTests = [
# Tests require network access
"fingerprint"
"ssl"
"test_custom_headers"
"test_custom_user_agent"
"test_default_headers"
"test_head"
"tls"
];
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 ];
};
}

View file

@ -23,6 +23,7 @@ buildPythonPackage (rec {
meta = with lib; {
description = "Official low-level client for Elasticsearch";
homepage = "https://github.com/elasticsearch/elasticsearch-py";
changelog = "https://github.com/elastic/elasticsearch-py/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ desiderius ];
};

View file

@ -0,0 +1,52 @@
{ lib
, aiohttp
, buildPythonPackage
, elastic-transport
, fetchPypi
, pythonOlder
, requests
, urllib3
}:
buildPythonPackage rec {
pname = "elasticsearch8";
version = "8.7.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-mRy48OYsm+0M1/D+abs83RiqN8wQr/Z6SZUY4TNg190=";
};
nativeBuildInputs = [
elastic-transport
];
propagatedBuildInputs = [
requests
];
passthru.optional-dependencies = {
async = [
aiohttp
];
};
# Check is disabled because running them destroy the content of the local cluster!
# https://github.com/elasticsearch/elasticsearch-py/tree/main/test_elasticsearch
doCheck = false;
pythonImportsCheck = [
"elasticsearch8"
];
meta = with lib; {
description = "Official low-level client for Elasticsearch";
homepage = "https://github.com/elasticsearch/elasticsearch-py";
changelog = "https://github.com/elastic/elasticsearch-py/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,74 @@
{ lib
, buildPythonPackage
, certifi
, click
, elastic-transport
, elasticsearch8
, fetchFromGitHub
, hatchling
, mock
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, six
, voluptuous
}:
buildPythonPackage rec {
pname = "es-client";
version = "8.7.0";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "untergeek";
repo = "es_client";
rev = "refs/tags/v${version}";
hash = "sha256-DJIo0yFJGR9gw5UJnmgnBFZx0uXUEW3rWT49jhfnXkQ=";
};
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
certifi
click
elastic-transport
elasticsearch8
pyyaml
six
voluptuous
];
nativeCheckInputs = [
mock
pytest-asyncio
pytestCheckHook
requests
];
pythonImportsCheck = [
"es_client"
];
disabledTests = [
# Tests require network access
"test_bad_version_raises"
"test_client_info"
"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 ];
};
}

View file

@ -3086,8 +3086,12 @@ self: super: with self; {
elastic-apm = callPackage ../development/python-modules/elastic-apm { };
elastic-transport = callPackage ../development/python-modules/elastic-transport { };
elasticsearch = callPackage ../development/python-modules/elasticsearch { };
elasticsearch8 = callPackage ../development/python-modules/elasticsearch8 { };
elasticsearch-dsl = callPackage ../development/python-modules/elasticsearch-dsl { };
elasticsearchdsl = self.elasticsearch-dsl;
@ -3192,6 +3196,8 @@ self: super: with self; {
eradicate = callPackage ../development/python-modules/eradicate { };
es-client = callPackage ../development/python-modules/es-client { };
espeak-phonemizer = callPackage ../development/python-modules/espeak-phonemizer { };
esphome-dashboard-api = callPackage ../development/python-modules/esphome-dashboard-api { };