about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/openapi-core/default.nix
blob: 8e39c899684c3832f5a9fb272a41bff5133e424c (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, isodate
, dictpath
, openapi-spec-validator
, openapi-schema-validator
, six
, lazy-object-proxy
, attrs
, werkzeug
, parse
, more-itertools
, pytestCheckHook
, falcon
, flask
, django
, djangorestframework
, responses
, mock
}:

buildPythonPackage rec {
  pname = "openapi-core";
  version = "0.14.2";

  src = fetchFromGitHub {
    owner = "p1c2u";
    repo = "openapi-core";
    rev = version;
    sha256 = "1npsibyf8zx6z230yl19kyap8g25kqvgm7z1w6rm6jxv58yqsp7r";
  };

  postPatch = ''
    sed -i "/^addopts/d" setup.cfg
  '';

  propagatedBuildInputs = [
    isodate
    dictpath
    openapi-spec-validator
    openapi-schema-validator
    six
    lazy-object-proxy
    attrs
    werkzeug
    parse
    more-itertools
  ];

  checkInputs = [
    pytestCheckHook
    falcon
    flask
    django
    djangorestframework
    responses
    mock
  ];

  disabledTestPaths = [
    # AttributeError: 'str' object has no attribute '__name__'
    "tests/integration/validation"
  ];

  disabledTests = [
    # TypeError: Unexpected keyword arguments passed to pytest.raises: message
    "test_string_format_invalid_value"
  ];

  pythonImportsCheck = [
    "openapi_core"
    "openapi_core.validation.request.validators"
    "openapi_core.validation.response.validators"
  ];

  meta = with lib; {
    description = "Client-side and server-side support for the OpenAPI Specification v3";
    homepage = "https://github.com/p1c2u/openapi-core";
    license = licenses.bsd3;
    maintainers = with maintainers; [ dotlambda ];
  };
}