ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / openapi-core / default.nix
blobbb5d02724bbea22a3afd941c28550799bd81d218
1 { lib
2 , buildPythonPackage
3 , django
4 , djangorestframework
5 , falcon
6 , fetchFromGitHub
7 , flask
8 , httpx
9 , isodate
10 , jsonschema-spec
11 , mock
12 , more-itertools
13 , openapi-schema-validator
14 , openapi-spec-validator
15 , parse
16 , pathable
17 , poetry-core
18 , pytestCheckHook
19 , pythonOlder
20 , responses
21 , requests
22 , starlette
23 , typing-extensions
24 , webob
25 , werkzeug
28 buildPythonPackage rec {
29   pname = "openapi-core";
30   version = "0.16.1";
31   format = "pyproject";
33   disabled = pythonOlder "3.7";
35   src = fetchFromGitHub {
36     owner = "p1c2u";
37     repo = "openapi-core";
38     rev = version;
39     hash = "sha256-J3n34HR5lfMM0ik5HAZ2JCr75fX5FTqBWrZ7E3/6XSE=";
40   };
42   postPatch = ''
43     sed -i "/--cov/d" pyproject.toml
44   '';
46   nativeBuildInputs = [
47     poetry-core
48   ];
50   propagatedBuildInputs = [
51     isodate
52     more-itertools
53     pathable
54     more-itertools
55     openapi-schema-validator
56     jsonschema-spec
57     openapi-spec-validator
58     typing-extensions
59     parse
60     werkzeug
61   ];
63   passthru.optional-dependencies = {
64     django = [
65       django
66     ];
67     falcon = [
68       falcon
69     ];
70     flask = [
71       flask
72     ];
73     requests = [
74       requests
75     ];
76     starlette = [
77       httpx
78       starlette
79     ];
80   };
82   checkInputs = [
83     mock
84     pytestCheckHook
85     responses
86     webob
87   ] ++ passthru.optional-dependencies.flask
88   ++ passthru.optional-dependencies.falcon
89   ++ passthru.optional-dependencies.django
90   ++ passthru.optional-dependencies.starlette
91   ++ passthru.optional-dependencies.requests;
93   disabledTestPaths = [
94     # AttributeError: 'str' object has no attribute '__name__'
95     #"tests/integration/validation"
96     # Requires secrets and additional configuration
97     "tests/integration/contrib/django/"
98     # Unable to detect SECRET_KEY and ROOT_URLCONF
99     "tests/integration/contrib/django/"
100   ];
102   pythonImportsCheck = [
103     "openapi_core"
104     "openapi_core.validation.request.validators"
105     "openapi_core.validation.response.validators"
106   ];
108   meta = with lib; {
109     description = "Client-side and server-side support for the OpenAPI Specification v3";
110     homepage = "https://github.com/p1c2u/openapi-core";
111     license = licenses.bsd3;
112     maintainers = with maintainers; [ dotlambda ];
113   };