summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/bravado-core/default.nix
blob: a402a1defbf6cc2ec39d04598d230aef0e40f9b0 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  # build inputs
  jsonref,
  jsonschema,
  python-dateutil,
  pyyaml,
  requests,
  simplejson,
  six,
  swagger-spec-validator,
  pytz,
  msgpack,
  # check inputs
  pytestCheckHook,
  mock,
}:

buildPythonPackage rec {
  pname = "bravado-core";
  version = "6.6.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Yelp";
    repo = "bravado-core";
    rev = "v${version}";
    hash = "sha256-kyHmZNPl5lLKmm5i3TSi8Tfi96mQHqaiyBfceBJcOdw=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    jsonref
    jsonschema # jsonschema[format-nongpl]
    python-dateutil
    pyyaml
    requests
    simplejson
    six
    swagger-spec-validator
    pytz
    msgpack
  ]
  ++ jsonschema.optional-dependencies.format-nongpl;

  nativeCheckInputs = [ pytestCheckHook ];

  checkInputs = [ mock ];

  pythonImportsCheck = [ "bravado_core" ];

  disabledTestPaths = [
    # skip benchmarks
    "tests/profiling"
    # take too long to run
    "tests/spec/Spec"
  ];

  meta = {
    description = "Library for adding Swagger support to clients and servers";
    homepage = "https://github.com/Yelp/bravado-core";
    changelog = "https://github.com/Yelp/bravado-core/blob/v${version}/CHANGELOG.rst";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [
      vanschelven
      nickcao
    ];
  };
}