2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# propagates
|
2021-12-06 16:07:01 +00:00
|
|
|
, isodate
|
|
|
|
, pyparsing
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
# propagates <3.8
|
|
|
|
, importlib-metadata
|
|
|
|
|
|
|
|
# extras: networkx
|
|
|
|
, networkx
|
|
|
|
|
|
|
|
# extras: html
|
|
|
|
, html5lib
|
|
|
|
|
|
|
|
# tests
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rdflib";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "6.1.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RDFLib";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
hash = "sha256:1ih7vx4i16np1p8ig5faw74apmbm7kgyj9alya521yvzid6d7pzd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
isodate
|
|
|
|
html5lib
|
|
|
|
pyparsing
|
2022-04-15 01:41:22 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-04-15 01:41:22 +00:00
|
|
|
html = [
|
|
|
|
html5lib
|
|
|
|
];
|
|
|
|
networkx = [
|
|
|
|
networkx
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-04-15 01:41:22 +00:00
|
|
|
]
|
2022-06-16 17:23:12 +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
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Requires network access
|
|
|
|
"test_service"
|
|
|
|
"testGuessFormatForParse"
|
2022-10-30 15:09:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2021-12-06 16:07:01 +00:00
|
|
|
# Require loopback network access
|
|
|
|
"TestGraphHTTP"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +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
|
|
|
};
|
|
|
|
}
|