From 6f10c32ca84d1a3016b80a98dce8b579c2a8cc3c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 16 Mar 2025 12:07:25 +0100 Subject: [PATCH] python313Packages.functions-framework: init at 3.8.2 FaaS (Function as a service) framework for writing portable Python functions https://github.com/GoogleCloudPlatform/functions-framework-python --- .../functions-framework/default.nix | 66 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 68 insertions(+) create mode 100644 pkgs/development/python-modules/functions-framework/default.nix diff --git a/pkgs/development/python-modules/functions-framework/default.nix b/pkgs/development/python-modules/functions-framework/default.nix new file mode 100644 index 000000000000..b9df27a48b5f --- /dev/null +++ b/pkgs/development/python-modules/functions-framework/default.nix @@ -0,0 +1,66 @@ +{ + lib, + buildPythonPackage, + click, + cloudevents, + deprecation, + docker, + fetchFromGitHub, + flask, + gunicorn, + pretend, + pytest-asyncio, + pytestCheckHook, + requests, + setuptools, + watchdog, + werkzeug, +}: + +buildPythonPackage rec { + pname = "functions-framework"; + version = "3.8.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "GoogleCloudPlatform"; + repo = "functions-framework-python"; + rev = "v${version}"; + hash = "sha256-wLL8VWhRb3AEa41DO/mwx3G0AwmLACiXeDvo+LEq1xM="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + click + cloudevents + deprecation + flask + gunicorn + watchdog + werkzeug + ]; + + nativeCheckInputs = [ + docker + pretend + pytest-asyncio + pytestCheckHook + requests + ]; + + disabledTests = [ + # Test requires a running Docker instance + "test_cloud_run_http" + ]; + + pythonImportsCheck = [ "functions_framework" ]; + + meta = { + description = "FaaS (Function as a service) framework for writing portable Python functions"; + homepage = "https://github.com/GoogleCloudPlatform/functions-framework-python"; + changelog = "https://github.com/GoogleCloudPlatform/functions-framework-python/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 22227021a161..43f39ca9ba7b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5109,6 +5109,8 @@ self: super: with self; { funcsigs = callPackage ../development/python-modules/funcsigs { }; + functions-framework = callPackage ../development/python-modules/functions-framework { }; + functiontrace = callPackage ../development/python-modules/functiontrace { }; funcy = callPackage ../development/python-modules/funcy { };