1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, fqdn
6, idna
7, isoduration
8, jsonpointer
9, jsonref
10, jsonschema
11, mock
12, msgpack
13, mypy-extensions
14, pytest-benchmark
15, pytestCheckHook
16, python-dateutil
17, pythonOlder
18, pytz
19, pyyaml
20, rfc3987
21, rfc3339-validator
22, simplejson
23, six
24, strict-rfc3339
25, swagger-spec-validator
26, uri-template
27, webcolors
28}:
29
30buildPythonPackage rec {
31 pname = "bravado-core";
32 version = "5.17.0";
33 format = "setuptools";
34
35 disabled = pythonOlder "3.7";
36
37 src = fetchFromGitHub {
38 owner = "Yelp";
39 repo = pname;
40 rev = "v${version}";
41 hash = "sha256-okQA4YJq0lyVJuDzD8mMRlOS/K3gf1qRUpw/5M0LlZE=";
42 };
43
44 propagatedBuildInputs = [
45 jsonref
46 jsonschema
47 msgpack
48 python-dateutil
49 pytz
50 pyyaml
51 simplejson
52 six
53 swagger-spec-validator
54
55 # the following packages are included when jsonschema (3.2) is installed
56 # as jsonschema[format], which reflects what happens in setup.py
57 fqdn
58 idna
59 isoduration
60 jsonpointer
61 rfc3987
62 rfc3339-validator
63 strict-rfc3339
64 uri-template
65 webcolors
66 ];
67
68 checkInputs = [
69 mypy-extensions
70 pytestCheckHook
71 mock
72 pytest-benchmark
73 ];
74
75 pythonImportsCheck = [
76 "bravado_core"
77 ];
78
79 pytestFlagsArray = [
80 "--benchmark-skip"
81 ];
82
83 disabledTestPaths = [
84 # Tests are out-dated (not supporting later modules releases, e.g., jsonschema)
85 "tests/_decorators_test.py"
86 "tests/formatter"
87 "tests/marshal"
88 "tests/model"
89 "tests/operation"
90 "tests/param"
91 "tests/request"
92 "tests/resource"
93 "tests/response"
94 "tests/schema"
95 "tests/security_test.py"
96 "tests/spec"
97 "tests/swagger20_validator"
98 "tests/unmarshal"
99 "tests/validate"
100 ];
101
102 disabledTests = [
103 "test_petstore_spec"
104 ];
105
106 meta = with lib; {
107 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
108 description = "Library for adding Swagger support to clients and servers";
109 homepage = "https://github.com/Yelp/bravado-core";
110 license = licenses.bsd3;
111 maintainers = with maintainers; [ vanschelven ];
112 };
113}