Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / rdflib / default.nix
blobd0f62efa6a78bdfd39992e5c2fc1d8dd0003ce08
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pythonOlder
7 # builds
8 , poetry-core
10 # propagates
11 , isodate
12 , pyparsing
14 # propagates <3.8
15 , importlib-metadata
17 # extras: networkx
18 , networkx
20 # extras: html
21 , html5lib
23 # tests
24 , pip
25 , pytest-cov
26 , pytest7CheckHook
27 , setuptools
30 buildPythonPackage rec {
31   pname = "rdflib";
32   version = "7.0.0";
33   format = "pyproject";
35   disabled = pythonOlder "3.8";
37   src = fetchFromGitHub {
38     owner = "RDFLib";
39     repo = pname;
40     rev = "refs/tags/${version}";
41     hash = "sha256-VCjvgXMun1Hs+gPeqjzLXbIX1NBQ5aMLz0aWlwsm0iY=";
42   };
44   nativeBuildInputs = [
45     poetry-core
46   ];
48   propagatedBuildInputs = [
49     isodate
50     html5lib
51     pyparsing
52   ] ++ lib.optionals (pythonOlder "3.8") [
53     importlib-metadata
54   ];
56   passthru.optional-dependencies = {
57     html = [
58       html5lib
59     ];
60     networkx = [
61       networkx
62     ];
63   };
65   __darwinAllowLocalNetworking = true;
67   nativeCheckInputs = [
68     pip
69     pytest-cov
70     # Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted.
71     pytest7CheckHook
72     setuptools
73   ]
74   ++ passthru.optional-dependencies.networkx
75   ++ passthru.optional-dependencies.html;
77   pytestFlagsArray = [
78     # requires network access
79     "--deselect=rdflib/__init__.py::rdflib"
80     "--deselect=test/jsonld/test_onedotone.py::test_suite"
81   ];
83   disabledTests = [
84     # Requires network access
85     "test_service"
86     "testGuessFormatForParse"
87     "test_infix_owl_example1"
88     "test_context"
89     "test_example"
90     "test_guess_format_for_parse"
91     "rdflib.extras.infixowl"
92   ] ++ lib.optionals stdenv.isDarwin [
93     # Require loopback network access
94     "TestGraphHTTP"
95   ];
97   pythonImportsCheck = [
98     "rdflib"
99   ];
101   meta = with lib; {
102     description = "Python library for working with RDF";
103     homepage = "https://rdflib.readthedocs.io";
104     license = licenses.bsd3;
105     maintainers = with maintainers; [ ];
106   };