1{
2 lib,
3 attrs,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatch-vcs,
7 hatchling,
8 jsonschema,
9 pytest-subtests,
10 pytestCheckHook,
11 pythonOlder,
12 rpds-py,
13 typing-extensions,
14}:
15
16let
17 self = buildPythonPackage rec {
18 pname = "referencing";
19 version = "0.36.2";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "python-jsonschema";
26 repo = "referencing";
27 tag = "v${version}";
28 fetchSubmodules = true;
29 hash = "sha256-VwViFiquacwJlELNDp01DRbtYQHOY4qXS2CjD7YmS6g=";
30 };
31
32 build-system = [
33 hatch-vcs
34 hatchling
35 ];
36
37 dependencies = [
38 attrs
39 rpds-py
40 typing-extensions
41 ];
42
43 nativeCheckInputs = [
44 jsonschema
45 pytest-subtests
46 pytestCheckHook
47 ];
48
49 # Avoid infinite recursion with jsonschema
50 doCheck = false;
51
52 passthru.tests.referencing = self.overridePythonAttrs { doCheck = true; };
53
54 pythonImportsCheck = [ "referencing" ];
55
56 meta = with lib; {
57 description = "Cross-specification JSON referencing";
58 homepage = "https://github.com/python-jsonschema/referencing";
59 changelog = "https://github.com/python-jsonschema/referencing/releases/tag/${src.tag}";
60 license = licenses.mit;
61 maintainers = with maintainers; [ fab ];
62 };
63 };
64in
65self