Unverified Commit fc3a477c authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

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
parents d74180d0 5ac17eba
Loading
Loading
Loading
Loading
+72 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -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 ];
  };
+52 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+74 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+6 −0
Original line number Diff line number Diff line
@@ -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 { };