about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/opensearch-py/default.nix
blob: ce61a587cd6b61abc4b20a89b90f8203088a7221 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ aiohttp
, botocore
, buildPythonPackage
, certifi
, fetchFromGitHub
, lib
, mock
, pytest-asyncio
, pytestCheckHook
, pyyaml
, requests
, urllib3
}:

buildPythonPackage rec {
  pname = "opensearch-py";
  version = "2.3.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "opensearch-project";
    repo = "opensearch-py";
    rev = "refs/tags/v${version}";
    hash = "sha256-MkrYCi/iz1OqqrwCZknfcZSEyZNPj+CZFiMycJQk+aQ=";
  };

  propagatedBuildInputs = [
    botocore
    certifi
    requests
    urllib3
  ];

  nativeCheckInputs = [
    mock
    pytest-asyncio
    pytestCheckHook
    pyyaml
  ] ++ passthru.optional-dependencies.async;

  disabledTestPaths = [
    # require network
    "test_opensearchpy/test_async/test_connection.py"
    "test_opensearchpy/test_async/test_server"
    "test_opensearchpy/test_connection.py"
    "test_opensearchpy/test_server"
    "test_opensearchpy/test_server_secured"
  ];

  passthru.optional-dependencies.async = [ aiohttp ];

  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 ];
  };
}