2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
2023-02-02 18:25:31 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, certifi
|
|
|
|
, python-dateutil
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, urllib3
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, aiohttp
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, botocore
|
2023-02-02 18:25:31 +00:00
|
|
|
, mock
|
|
|
|
, pytest-asyncio
|
2023-11-16 04:20:00 +00:00
|
|
|
, pytest-mock
|
2023-02-02 18:25:31 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pyyaml
|
2023-11-16 04:20:00 +00:00
|
|
|
, pytz
|
2023-02-02 18:25:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "opensearch-py";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.4.1";
|
|
|
|
pyproject = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "opensearch-project";
|
|
|
|
repo = "opensearch-py";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-nfKUJjB3yAUGiCSLK3xXHQmtDenVZpLjgICR2hMv1aA=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
certifi
|
2023-11-16 04:20:00 +00:00
|
|
|
python-dateutil
|
2023-02-02 18:25:31 +00:00
|
|
|
requests
|
2023-11-16 04:20:00 +00:00
|
|
|
six
|
2023-02-02 18:25:31 +00:00
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies.async = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
botocore
|
2023-02-02 18:25:31 +00:00
|
|
|
mock
|
|
|
|
pytest-asyncio
|
2023-11-16 04:20:00 +00:00
|
|
|
pytest-mock
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
2023-11-16 04:20:00 +00:00
|
|
|
pytz
|
2023-02-02 18:25:31 +00:00
|
|
|
] ++ passthru.optional-dependencies.async;
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# require network
|
|
|
|
"test_opensearchpy/test_async/test_connection.py"
|
|
|
|
"test_opensearchpy/test_async/test_server"
|
|
|
|
"test_opensearchpy/test_server"
|
|
|
|
"test_opensearchpy/test_server_secured"
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# finds our ca-bundle, but expects something else (/path/to/clientcert/dir or None)
|
|
|
|
"test_ca_certs_ssl_cert_dir"
|
|
|
|
"test_no_ca_certs"
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python low-level client for OpenSearch";
|
|
|
|
homepage = "https://github.com/opensearch-project/opensearch-py";
|
|
|
|
changelog = "https://github.com/opensearch-project/opensearch-py/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ mcwitt ];
|
|
|
|
};
|
|
|
|
}
|