From e539184044cefe093e4cc196c9eab883b866de0b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 28 Nov 2023 08:53:56 +0100 Subject: [PATCH] python311Packages.aiohttp-fast-url-dispatcher: init at 0.3.0 A faster URL dispatcher for aiohttp https://github.com/bdraco/aiohttp-fast-url-dispatcher --- .../aiohttp-fast-url-dispatcher/default.nix | 54 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/development/python-modules/aiohttp-fast-url-dispatcher/default.nix diff --git a/pkgs/development/python-modules/aiohttp-fast-url-dispatcher/default.nix b/pkgs/development/python-modules/aiohttp-fast-url-dispatcher/default.nix new file mode 100644 index 000000000000..905705c992dd --- /dev/null +++ b/pkgs/development/python-modules/aiohttp-fast-url-dispatcher/default.nix @@ -0,0 +1,54 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "aiohttp-fast-url-dispatcher"; + version = "0.3.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "bdraco"; + repo = "aiohttp-fast-url-dispatcher"; + rev = "refs/tags/v${version}"; + hash = "sha256-DZTW9CazcUY3hyxr0MbVfM/yJzUzwN43c2n07Sloxa8="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace " --cov=aiohttp_fast_url_dispatcher --cov-report=term-missing:skip-covered" "" + ''; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "aiohttp_fast_url_dispatcher" + ]; + + meta = with lib; { + description = "A faster URL dispatcher for aiohttp"; + homepage = "https://github.com/bdraco/aiohttp-fast-url-dispatcher"; + changelog = "https://github.com/bdraco/aiohttp-fast-url-dispatcher/blob/${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 147892d6d8af..b41400bedf84 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -232,6 +232,8 @@ self: super: with self; { aiohttp-cors = callPackage ../development/python-modules/aiohttp-cors { }; + aiohttp-fast-url-dispatcher = callPackage ../development/python-modules/aiohttp-fast-url-dispatcher { }; + aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { }; aiohttp-oauthlib = callPackage ../development/python-modules/aiohttp-oauthlib { };