at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 wheel, 7 rfc3986, 8 pytestCheckHook, 9 hypothesis, 10 requests, 11 pytest-httpserver, 12 pytest-xdist, 13}: 14 15buildPythonPackage rec { 16 pname = "jschon"; 17 version = "0.11.1"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "marksparkza"; 22 repo = "jschon"; 23 rev = "v${version}"; 24 hash = "sha256-uOvEIEUEILsoLuV5U9AJCQAlT4iHQhsnSt65gfCiW0k="; 25 fetchSubmodules = true; 26 }; 27 28 build-system = [ 29 setuptools 30 wheel 31 ]; 32 33 dependencies = [ 34 rfc3986 35 ]; 36 37 pythonImportsCheck = [ 38 "jschon" 39 "jschon.catalog" 40 "jschon.vocabulary" 41 "jschon.exc" 42 "jschon.exceptions" 43 "jschon.formats" 44 "jschon.json" 45 "jschon.jsonpatch" 46 "jschon.jsonpointer" 47 "jschon.jsonschema" 48 "jschon.output" 49 "jschon.uri" 50 "jschon.utils" 51 ]; 52 53 nativeCheckInputs = [ 54 pytestCheckHook 55 hypothesis 56 requests 57 pytest-httpserver 58 #pytest-benchmark # not needed for distribution 59 pytest-xdist # not used upstream, but massive speedup 60 ]; 61 62 disabledTests = [ 63 # flaky, timing sensitive 64 "test_keyword_dependency_resolution" 65 ]; 66 67 disabledTestPaths = [ 68 "tests/test_benchmarks.py" 69 ]; 70 71 # used in checks 72 __darwinAllowLocalNetworking = true; 73 74 meta = with lib; { 75 description = "Object-oriented JSON Schema implementation for Python"; 76 homepage = "https://github.com/marksparkza/jschon"; 77 changelog = "https://github.com/marksparkza/jschon/blob/${src.rev}/CHANGELOG.rst"; 78 license = licenses.mit; 79 maintainers = with maintainers; [ pbsds ]; 80 }; 81}