Unverified Commit 03688aaf authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #258023 from mbalatsko/init-aioprometheus

python3Packages.aioprometheus: init at unstable-2023-03-14
parents 6c905396 4216f2bf
Loading
Loading
Loading
Loading
+41 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+65 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+27 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+6 −0
Original line number Diff line number Diff line
@@ -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 { };
@@ -318,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 { };
@@ -11102,6 +11106,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 { };