2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# builds
|
|
|
|
poetry-core,
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
isodate,
|
|
|
|
pyparsing,
|
|
|
|
|
|
|
|
# propagates <3.8
|
|
|
|
importlib-metadata,
|
|
|
|
|
|
|
|
# extras: networkx
|
|
|
|
networkx,
|
|
|
|
|
|
|
|
# extras: html
|
|
|
|
html5lib,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
pip,
|
|
|
|
pytest-cov,
|
|
|
|
pytest7CheckHook,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rdflib";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "7.0.0";
|
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RDFLib";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-VCjvgXMun1Hs+gPeqjzLXbIX1NBQ5aMLz0aWlwsm0iY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
isodate
|
|
|
|
html5lib
|
|
|
|
pyparsing
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
html = [ html5lib ];
|
|
|
|
networkx = [ networkx ];
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
pip
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-cov
|
2024-04-21 15:54:59 +00:00
|
|
|
# Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted.
|
|
|
|
pytest7CheckHook
|
2024-01-13 08:15:51 +00:00
|
|
|
setuptools
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ passthru.optional-dependencies.networkx ++ passthru.optional-dependencies.html;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# requires network access
|
2022-04-15 01:41:22 +00:00
|
|
|
"--deselect=rdflib/__init__.py::rdflib"
|
|
|
|
"--deselect=test/jsonld/test_onedotone.py::test_suite"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Requires network access
|
|
|
|
"test_service"
|
|
|
|
"testGuessFormatForParse"
|
|
|
|
"test_infix_owl_example1"
|
|
|
|
"test_context"
|
|
|
|
"test_example"
|
|
|
|
"test_guess_format_for_parse"
|
|
|
|
"rdflib.extras.infixowl"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# Require loopback network access
|
|
|
|
"TestGraphHTTP"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "rdflib" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for working with RDF";
|
|
|
|
homepage = "https://rdflib.readthedocs.io";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|