ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / starlette / default.nix
blob6d96df91c4f526dd4ead0cd81d6b1002f845a293
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , aiofiles
7 , anyio
8 , contextlib2
9 , itsdangerous
10 , jinja2
11 , python-multipart
12 , pyyaml
13 , requests
14 , aiosqlite
15 , databases
16 , pytestCheckHook
17 , pythonOlder
18 , trio
19 , typing-extensions
20 , ApplicationServices
23 buildPythonPackage rec {
24   pname = "starlette";
25   version = "0.20.4";
26   format = "setuptools";
28   disabled = pythonOlder "3.6";
30   src = fetchFromGitHub {
31     owner = "encode";
32     repo = pname;
33     rev = "refs/tags/${version}";
34     hash = "sha256-vP2TJPn9lRGnLGkO8lUmnsoT6rSnhuWDD3WqNk76SM0=";
35   };
37   patches = [
38     (fetchpatch {
39       url = "https://github.com/encode/starlette/commit/ab70211f0e1fb7390668bf4891eeceda8d9723a0.diff";
40       excludes = [ "requirements.txt" ]; # conflicts
41       hash = "sha256-UHf4c4YUWp/1I1vD8J0hMewdlfkmluA+FyGf9ZsSv3Y=";
42     })
43   ];
45   postPatch = ''
46     # remove coverage arguments to pytest
47     sed -i '/--cov/d' setup.cfg
48   '';
50   propagatedBuildInputs = [
51     aiofiles
52     anyio
53     itsdangerous
54     jinja2
55     python-multipart
56     pyyaml
57     requests
58   ] ++ lib.optionals (pythonOlder "3.8") [
59     typing-extensions
60   ] ++ lib.optionals (pythonOlder "3.7") [
61     contextlib2
62   ] ++ lib.optionals stdenv.isDarwin [
63     ApplicationServices
64   ];
66   checkInputs = [
67     aiosqlite
68     databases
69     pytestCheckHook
70     trio
71     typing-extensions
72   ];
74   disabledTests = [
75     # asserts fail due to inclusion of br in Accept-Encoding
76     "test_websocket_headers"
77     "test_request_headers"
78   ];
80   pythonImportsCheck = [
81     "starlette"
82   ];
84   meta = with lib; {
85     homepage = "https://www.starlette.io/";
86     description = "The little ASGI framework that shines";
87     license = licenses.bsd3;
88     maintainers = with maintainers; [ wd15 ];
89   };