1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# build-system
6, setuptools
7
8# dependencies
9, certifi
10, python-dateutil
11, requests
12, six
13, urllib3
14
15# optional-dependencies
16, aiohttp
17
18# tests
19, botocore
20, mock
21, pytest-asyncio
22, pytest-mock
23, pytestCheckHook
24, pyyaml
25, pytz
26}:
27
28buildPythonPackage rec {
29 pname = "opensearch-py";
30 version = "2.4.2";
31 pyproject = true;
32
33 src = fetchFromGitHub {
34 owner = "opensearch-project";
35 repo = "opensearch-py";
36 rev = "refs/tags/v${version}";
37 hash = "sha256-MPuHdjhsrccKYUIDlDYGoXBbBu/V+q43Puf0e5j8vhU=";
38 };
39
40 nativeBuildInputs = [
41 setuptools
42 ];
43
44 propagatedBuildInputs = [
45 certifi
46 python-dateutil
47 requests
48 six
49 urllib3
50 ];
51
52 passthru.optional-dependencies.async = [
53 aiohttp
54 ];
55
56 nativeCheckInputs = [
57 botocore
58 mock
59 pytest-asyncio
60 pytest-mock
61 pytestCheckHook
62 pyyaml
63 pytz
64 ] ++ passthru.optional-dependencies.async;
65
66 disabledTestPaths = [
67 # require network
68 "test_opensearchpy/test_async/test_connection.py"
69 "test_opensearchpy/test_async/test_server"
70 "test_opensearchpy/test_server"
71 "test_opensearchpy/test_server_secured"
72 ];
73
74 disabledTests = [
75 # finds our ca-bundle, but expects something else (/path/to/clientcert/dir or None)
76 "test_ca_certs_ssl_cert_dir"
77 "test_no_ca_certs"
78 ];
79
80 meta = {
81 description = "Python low-level client for OpenSearch";
82 homepage = "https://github.com/opensearch-project/opensearch-py";
83 changelog = "https://github.com/opensearch-project/opensearch-py/releases/tag/v${version}";
84 license = lib.licenses.asl20;
85 maintainers = with lib.maintainers; [ mcwitt ];
86 };
87}