python311Packages.elasticsearch: add optional-dependencies

- clean-up inputs
- add pythonImportsCheck
- equalize content
This commit is contained in:
Fabian Affolter
2023-12-20 20:46:00 +01:00
committed by Martin Weinelt
parent 0e9cc3e38c
commit a40ddfdebb
@@ -1,15 +1,20 @@
{ buildPythonPackage
{ lib
, aiohttp
, buildPythonPackage
, certifi
, elastic-transport
, fetchPypi
, setuptools
, urllib3, requests
, nosexcover, mock
, lib
, pythonOlder
, requests
, urllib3
}:
buildPythonPackage (rec {
buildPythonPackage rec {
pname = "elasticsearch";
version = "8.11.0";
pyproject = true;
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
@@ -17,14 +22,30 @@ buildPythonPackage (rec {
};
nativeBuildInputs = [
setuptools
elastic-transport
];
propagatedBuildInputs = [
urllib3
certifi
];
passthru.optional-dependencies = {
requests = [
requests
];
async = [
aiohttp
];
};
pythonImportsCheck = [
"elasticsearch"
];
# Check is disabled because running them destroy the content of the local cluster!
# https://github.com/elasticsearch/elasticsearch-py/tree/master/test_elasticsearch
doCheck = false;
propagatedBuildInputs = [ urllib3 requests ];
buildInputs = [ nosexcover mock ];
meta = with lib; {
description = "Official low-level client for Elasticsearch";
@@ -33,4 +54,4 @@ buildPythonPackage (rec {
license = licenses.asl20;
maintainers = with maintainers; [ desiderius ];
};
})
}