From db09900aa67055397d803a44247699049bc74fa8 Mon Sep 17 00:00:00 2001 From: Matt Wittmann Date: Fri, 27 Jan 2023 16:56:10 -0800 Subject: [PATCH] python310Packages.opensearch-py: init at 2.1.1 --- .../python-modules/opensearch-py/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/opensearch-py/default.nix diff --git a/pkgs/development/python-modules/opensearch-py/default.nix b/pkgs/development/python-modules/opensearch-py/default.nix new file mode 100644 index 000000000000..7f9fd5c85b16 --- /dev/null +++ b/pkgs/development/python-modules/opensearch-py/default.nix @@ -0,0 +1,59 @@ +{ aiohttp +, botocore +, buildPythonPackage +, certifi +, fetchFromGitHub +, lib +, mock +, pytest-asyncio +, pytestCheckHook +, pyyaml +, requests +, urllib3 +}: + +buildPythonPackage rec { + pname = "opensearch-py"; + version = "2.1.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "opensearch-project"; + repo = "opensearch-py"; + rev = "refs/tags/v${version}"; + hash = "sha256-uJ6fdRPDK76qKHE4E6dI01vKgvfqbc6A1RCwnOtuOTY="; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dac63cf3b790..9ceaf2b4d3e5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6645,6 +6645,8 @@ self: super: with self; { openrouteservice = callPackage ../development/python-modules/openrouteservice { }; + opensearch-py = callPackage ../development/python-modules/opensearch-py { }; + opensensemap-api = callPackage ../development/python-modules/opensensemap-api { }; opensfm = callPackage ../development/python-modules/opensfm { };