From e21763ec29c66c974f343047b4102689c3a67063 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Mar 2024 14:07:49 +0100 Subject: python312Packages.sse-starlette: init at 2.0.0 Server Sent Events for Starlette and FastAPI https://github.com/sysid/sse-starlette --- .../python-modules/sse-starlette/default.nix | 67 ++++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/development/python-modules/sse-starlette/default.nix diff --git a/pkgs/development/python-modules/sse-starlette/default.nix b/pkgs/development/python-modules/sse-starlette/default.nix new file mode 100644 index 000000000000..149a37886ca0 --- /dev/null +++ b/pkgs/development/python-modules/sse-starlette/default.nix @@ -0,0 +1,67 @@ +{ lib +, anyio +, asgi-lifespan +, buildPythonPackage +, fastapi +, fetchFromGitHub +, httpx +, pdm-backend +, psutil +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, starlette +, uvicorn +}: + +buildPythonPackage rec { + pname = "sse-starlette"; + version = "2.0.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "sysid"; + repo = "sse-starlette"; + rev = "refs/tags/v${version}"; + hash = "sha256-kDcSG/3foP7fMZKYrkKx6FHvT9c9rSzxyv2EHjQ2WSA="; + }; + + build-system = [ + pdm-backend + ]; + + dependencies = [ + anyio + starlette + uvicorn + ]; + + nativeCheckInputs = [ + asgi-lifespan + fastapi + httpx + psutil + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "sse_starlette" + ]; + + disabledTests = [ + # AssertionError + "test_stop_server_with_many_consumers" + "test_stop_server_conditional" + ]; + + meta = with lib; { + description = "Server Sent Events for Starlette and FastAPI"; + homepage = "https://github.com/sysid/sse-starlette"; + changelog = "https://github.com/sysid/sse-starlette/blob/${version}/CHANGELOG.md"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 646526c40549..2209f7386643 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14216,6 +14216,8 @@ self: super: with self; { sseclient-py = callPackage ../development/python-modules/sseclient-py { }; + sse-starlette = callPackage ../development/python-modules/sse-starlette { }; + sshfs = callPackage ../development/python-modules/sshfs { }; sshpubkeys = callPackage ../development/python-modules/sshpubkeys { }; -- cgit 1.4.1