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