From 175db3dcf32dc92566f56a805c87d2e7ada72cb3 Mon Sep 17 00:00:00 2001 From: Maksym Balatsko Date: Fri, 29 Sep 2023 05:05:55 -0700 Subject: [PATCH 1/3] python3Packages.quantile-python: init at 1.1 --- .../quantile-python/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/python-modules/quantile-python/default.nix diff --git a/pkgs/development/python-modules/quantile-python/default.nix b/pkgs/development/python-modules/quantile-python/default.nix new file mode 100644 index 000000000000..98206ff8aaba --- /dev/null +++ b/pkgs/development/python-modules/quantile-python/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "quantile-python"; + version = "1.1"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-VYYp6IxJfvO5sQgTScGuamG1NZDjF3JCmP9UxnTbeWk="; + }; + + # package has no tests + doCheck = false; + + pythonImportsCheck = [ "quantile" ]; + + meta = with lib; { + description = "Python Implementation of Graham Cormode and S. Muthukrishnan's Effective Computation of Biased Quantiles over Data Streams in ICDE'05"; + homepage = "https://github.com/matttproud/python_quantile_estimation"; + license = licenses.asl20; + maintainers = with maintainers; [ mbalatsko ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf7d72b5347d..1ee132f7eaf5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11100,6 +11100,8 @@ self: super: with self; { quantiphy = callPackage ../development/python-modules/quantiphy { }; + quantile-python = callPackage ../development/python-modules/quantile-python { }; + quantiphy-eval = callPackage ../development/python-modules/quantiphy-eval { }; quantum-gateway = callPackage ../development/python-modules/quantum-gateway { }; From 7e922ee6e0917c9c76a93f8d730907fc88d4adf7 Mon Sep 17 00:00:00 2001 From: Maksym Balatsko Date: Sat, 30 Sep 2023 09:19:53 -0700 Subject: [PATCH 2/3] python3Packages.aiohttp-basicauth: init at 1.0.0 --- .../aiohttp-basicauth/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/aiohttp-basicauth/default.nix diff --git a/pkgs/development/python-modules/aiohttp-basicauth/default.nix b/pkgs/development/python-modules/aiohttp-basicauth/default.nix new file mode 100644 index 000000000000..9855971564bc --- /dev/null +++ b/pkgs/development/python-modules/aiohttp-basicauth/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiohttp +, pytestCheckHook +, pytest-asyncio +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiohttp-basicauth"; + version = "1.0.0"; + format = "setuptools"; + + disable = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "romis2012"; + repo = "aiohttp-basicauth"; + rev = "v${version}"; + hash = "sha256-UaRzauHmBHYwXFqRwDn1py79BScqq5j5SWALM4dQBP4="; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ "aiohttp_basicauth" ]; + + meta = with lib; { + description = "HTTP basic authentication middleware for aiohttp 3.0"; + homepage = "https://github.com/romis2012/aiohttp-basicauth"; + license = licenses.asl20; + maintainers = with maintainers; [ mbalatsko ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1ee132f7eaf5..cd569f3dfd56 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -224,6 +224,8 @@ self: super: with self; { aiohttp-apispec = callPackage ../development/python-modules/aiohttp-apispec { }; + aiohttp-basicauth = callPackage ../development/python-modules/aiohttp-basicauth { }; + aiohttp-cors = callPackage ../development/python-modules/aiohttp-cors { }; aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { }; From 4216f2bf0648eb276d65e75419f4ee89b00083be Mon Sep 17 00:00:00 2001 From: Maksym Balatsko Date: Sat, 30 Sep 2023 09:27:04 -0700 Subject: [PATCH 3/3] python3Packages.aioprometheus: init at unstable-2023-03-14 --- .../python-modules/aioprometheus/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/aioprometheus/default.nix diff --git a/pkgs/development/python-modules/aioprometheus/default.nix b/pkgs/development/python-modules/aioprometheus/default.nix new file mode 100644 index 000000000000..5c875ea70087 --- /dev/null +++ b/pkgs/development/python-modules/aioprometheus/default.nix @@ -0,0 +1,65 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, orjson +, quantile-python +, aiohttp +, aiohttp-basicauth +, starlette +, quart +, pytestCheckHook +, httpx +, fastapi +, uvicorn +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aioprometheus"; + version = "unstable-2023-03-14"; + format = "setuptools"; + + disable = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "claws"; + repo = "aioprometheus"; + rev = "4786678b413d166c0b6e0041558d11bc1a7097b2"; + hash = "sha256-2z68rQkMjYqkszg5Noj9owWUWQGOEp/91RGiWiyZVOY="; + }; + + propagatedBuildInputs = [ + orjson + quantile-python + ]; + + passthru.optional-dependencies = { + aiohttp = [ + aiohttp + ]; + starlette = [ + starlette + ]; + quart = [ + quart + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + aiohttp-basicauth + httpx + fastapi + uvicorn + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ "aioprometheus" ]; + + meta = with lib; { + description = "A Prometheus Python client library for asyncio-based applications"; + homepage = "https://github.com/claws/aioprometheus"; + changelog = "https://github.com/claws/aioprometheus/blob/${src.rev}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ mbalatsko ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cd569f3dfd56..eb5f5e522b2f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -320,6 +320,8 @@ self: super: with self; { aioprocessing = callPackage ../development/python-modules/aioprocessing { }; + aioprometheus = callPackage ../development/python-modules/aioprometheus { }; + aiopulse = callPackage ../development/python-modules/aiopulse { }; aiopurpleair = callPackage ../development/python-modules/aiopurpleair { };