about summary refs log tree commit diff
path: root/pkgs/development/python-modules/jschon/default.nix
blob: 8a1686095fbfb47681b8c529af9d538f15091715 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, rfc3986
, pytestCheckHook
, hypothesis
, requests
, pytest-httpserver
, pytest-xdist
}:

buildPythonPackage rec {
  pname = "jschon";
  version = "0.11.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "marksparkza";
    repo = "jschon";
    rev = "v${version}";
    hash = "sha256-uOvEIEUEILsoLuV5U9AJCQAlT4iHQhsnSt65gfCiW0k=";
    fetchSubmodules = true;
  };

  build-system = [
    setuptools
    wheel
  ];

  dependencies = [
    rfc3986
  ];

  pythonImportsCheck = [
    "jschon"
    "jschon.catalog"
    "jschon.vocabulary"
    "jschon.exc"
    "jschon.exceptions"
    "jschon.formats"
    "jschon.json"
    "jschon.jsonpatch"
    "jschon.jsonpointer"
    "jschon.jsonschema"
    "jschon.output"
    "jschon.uri"
    "jschon.utils"
  ];

  nativeCheckInputs = [
    pytestCheckHook
    hypothesis
    requests
    pytest-httpserver
    #pytest-benchmark # not needed for distribution
    pytest-xdist # not used upstream, but massive speedup
  ];

  disabledTestPaths = [
    "tests/test_benchmarks.py"
  ];

  # used in checks
  __darwinAllowLocalNetworking = true;

  meta = with lib; {
    description = "An object-oriented JSON Schema implementation for Python";
    homepage = "https://github.com/marksparkza/jschon";
    changelog = "https://github.com/marksparkza/jschon/blob/${src.rev}/CHANGELOG.rst";
    license = licenses.mit;
    maintainers = with maintainers; [ pbsds ];
  };
}