biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / rdflib / default.nix
blobf6a5ded15e74ffacb43747a116a702b3a47f638a
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
6   pythonOlder,
8   # builds
9   poetry-core,
11   # propagates
12   isodate,
13   pyparsing,
15   # propagates <3.8
16   importlib-metadata,
18   # extras: networkx
19   networkx,
21   # extras: html
22   html5lib,
24   # tests
25   pip,
26   pytest-cov,
27   pytest7CheckHook,
28   setuptools,
31 buildPythonPackage rec {
32   pname = "rdflib";
33   version = "7.0.0";
34   format = "pyproject";
36   disabled = pythonOlder "3.8";
38   src = fetchFromGitHub {
39     owner = "RDFLib";
40     repo = pname;
41     rev = "refs/tags/${version}";
42     hash = "sha256-VCjvgXMun1Hs+gPeqjzLXbIX1NBQ5aMLz0aWlwsm0iY=";
43   };
45   nativeBuildInputs = [ poetry-core ];
47   propagatedBuildInputs = [
48     isodate
49     html5lib
50     pyparsing
51   ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
53   optional-dependencies = {
54     html = [ html5lib ];
55     networkx = [ networkx ];
56   };
58   __darwinAllowLocalNetworking = true;
60   nativeCheckInputs = [
61     pip
62     pytest-cov
63     # Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted.
64     pytest7CheckHook
65     setuptools
66   ] ++ optional-dependencies.networkx ++ optional-dependencies.html;
68   pytestFlagsArray = [
69     # requires network access
70     "--deselect=rdflib/__init__.py::rdflib"
71     "--deselect=test/jsonld/test_onedotone.py::test_suite"
72   ];
74   disabledTests =
75     [
76       # Requires network access
77       "test_service"
78       "testGuessFormatForParse"
79       "test_infix_owl_example1"
80       "test_context"
81       "test_example"
82       "test_guess_format_for_parse"
83       "rdflib.extras.infixowl"
84     ]
85     ++ lib.optionals stdenv.hostPlatform.isDarwin [
86       # Require loopback network access
87       "TestGraphHTTP"
88     ];
90   pythonImportsCheck = [ "rdflib" ];
92   meta = with lib; {
93     description = "Python library for working with RDF";
94     homepage = "https://rdflib.readthedocs.io";
95     license = licenses.bsd3;
96     maintainers = [ ];
97   };