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