Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / starlette / default.nix
blob5bdc0c505a0908c9313f41a5ceb7da14aa8f9875
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build-system
6 , hatchling
8 # dependencies
9 , anyio
10 , typing-extensions
12 # optional dependencies
13 , itsdangerous
14 , jinja2
15 , python-multipart
16 , pyyaml
17 , httpx
19 # tests
20 , pytestCheckHook
21 , pythonOlder
22 , trio
24 # reverse dependencies
25 , fastapi
28 buildPythonPackage rec {
29   pname = "starlette";
30   version = "0.37.2";
31   pyproject = true;
33   disabled = pythonOlder "3.8";
35   src = fetchFromGitHub {
36     owner = "encode";
37     repo = "starlette";
38     rev = "refs/tags/${version}";
39     hash = "sha256-GiCN1sfhLu9i19d2OcLZrlY8E64DFrFh+ITRSvLaxdE=";
40   };
42   nativeBuildInputs = [
43     hatchling
44   ];
46   propagatedBuildInputs = [
47     anyio
48   ] ++ lib.optionals (pythonOlder "3.10") [
49     typing-extensions
50   ];
52   passthru.optional-dependencies.full = [
53     itsdangerous
54     jinja2
55     python-multipart
56     pyyaml
57     httpx
58   ];
60   nativeCheckInputs = [
61     pytestCheckHook
62     trio
63     typing-extensions
64   ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
66   pytestFlagsArray = [
67     "-W" "ignore::DeprecationWarning"
68     "-W" "ignore::trio.TrioDeprecationWarning"
69   ];
71   pythonImportsCheck = [
72     "starlette"
73   ];
75   passthru.tests = {
76     inherit fastapi;
77   };
79   meta = with lib; {
80     changelog = "https://www.starlette.io/release-notes/#${lib.replaceStrings [ "." ] [ "" ] version}";
81     downloadPage = "https://github.com/encode/starlette";
82     homepage = "https://www.starlette.io/";
83     description = "The little ASGI framework that shines";
84     license = licenses.bsd3;
85     maintainers = with maintainers; [ wd15 ];
86   };