summary refs log tree commit diff
path: root/pkgs/development/python-modules/bravado-core/default.nix
blob: eb0e03653e5911a4795ca82d829762ede8b27e98 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, fqdn
, idna
, isoduration
, jsonpointer
, jsonref
, jsonschema
, mock
, msgpack
, mypy-extensions
, pytest-benchmark
, pytestCheckHook
, python-dateutil
, pythonOlder
, pytz
, pyyaml
, rfc3987
, rfc3339-validator
, simplejson
, six
, strict-rfc3339
, swagger-spec-validator
, uri-template
, webcolors
}:

buildPythonPackage rec {
  pname = "bravado-core";
  version = "5.17.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "Yelp";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-okQA4YJq0lyVJuDzD8mMRlOS/K3gf1qRUpw/5M0LlZE=";
  };

  propagatedBuildInputs = [
    jsonref
    jsonschema
    msgpack
    python-dateutil
    pytz
    pyyaml
    simplejson
    six
    swagger-spec-validator

    # the following packages are included when jsonschema (3.2) is installed
    # as jsonschema[format], which reflects what happens in setup.py
    fqdn
    idna
    isoduration
    jsonpointer
    rfc3987
    rfc3339-validator
    strict-rfc3339
    uri-template
    webcolors
  ];

  checkInputs = [
    mypy-extensions
    pytestCheckHook
    mock
    pytest-benchmark
  ];

  pythonImportsCheck = [
    "bravado_core"
  ];

  pytestFlagsArray = [
    "--benchmark-skip"
  ];

  disabledTestPaths = [
    # Tests are out-dated (not supporting later modules releases, e.g., jsonschema)
    "tests/_decorators_test.py"
    "tests/formatter"
    "tests/marshal"
    "tests/model"
    "tests/operation"
    "tests/param"
    "tests/request"
    "tests/resource"
    "tests/response"
    "tests/schema"
    "tests/security_test.py"
    "tests/spec"
    "tests/swagger20_validator"
    "tests/unmarshal"
    "tests/validate"
  ];

  disabledTests = [
    "test_petstore_spec"
  ];

  meta = with lib; {
    broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
    description = "Library for adding Swagger support to clients and servers";
    homepage = "https://github.com/Yelp/bravado-core";
    license = licenses.bsd3;
    maintainers = with maintainers; [ vanschelven ];
  };
}