1{
2 lib,
3 buildPythonPackage,
4 click,
5 cloudevents,
6 deprecation,
7 docker,
8 fetchFromGitHub,
9 flask,
10 gunicorn,
11 httpx,
12 pretend,
13 pytest-asyncio,
14 pytestCheckHook,
15 requests,
16 setuptools,
17 starlette,
18 uvicorn,
19 uvicorn-worker,
20 watchdog,
21 werkzeug,
22}:
23
24buildPythonPackage rec {
25 pname = "functions-framework";
26 version = "3.9.2";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "GoogleCloudPlatform";
31 repo = "functions-framework-python";
32 tag = "v${version}";
33 hash = "sha256-TvC+URJtsquBX/5F5Z2Nw/4sD3hsvF2c/jlv87lGjfM=";
34 };
35
36 build-system = [ setuptools ];
37
38 pythonRelaxDeps = [
39 "cloudevents"
40 ];
41 dependencies = [
42 click
43 cloudevents
44 deprecation
45 flask
46 gunicorn
47 starlette
48 uvicorn
49 uvicorn-worker
50 watchdog
51 werkzeug
52 ];
53
54 nativeCheckInputs = [
55 docker
56 httpx
57 pretend
58 pytest-asyncio
59 pytestCheckHook
60 requests
61 ];
62
63 pythonImportsCheck = [ "functions_framework" ];
64
65 disabledTests = [
66 # Test requires a running Docker instance
67 "test_cloud_run_http"
68 ];
69
70 meta = {
71 description = "FaaS (Function as a service) framework for writing portable Python functions";
72 homepage = "https://github.com/GoogleCloudPlatform/functions-framework-python";
73 changelog = "https://github.com/GoogleCloudPlatform/functions-framework-python/blob/${src.tag}/CHANGELOG.md";
74 license = lib.licenses.asl20;
75 maintainers = with lib.maintainers; [ fab ];
76 };
77}