nixpkgs/pkgs/development/python-modules/rdflib/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
1.5 KiB
Nix
Raw Normal View History

2021-11-05 15:14:30 +00:00
{ lib
2021-11-08 21:12:32 +00:00
, stdenv
2021-11-05 15:14:30 +00:00
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# propagates
2021-11-05 15:14:30 +00:00
, isodate
, pyparsing
# propagates <3.8
, importlib-metadata
# extras: networkx
, networkx
# extras: html
, html5lib
# tests
2021-11-05 15:14:30 +00:00
, pytestCheckHook
2018-02-03 08:35:22 +00:00
}:
buildPythonPackage rec {
pname = "rdflib";
2022-01-14 00:58:54 +00:00
version = "6.1.1";
2021-11-05 15:14:30 +00:00
format = "setuptools";
disabled = pythonOlder "3.7";
2018-02-03 08:35:22 +00:00
src = fetchFromGitHub {
owner = "RDFLib";
repo = pname;
rev = version;
hash = "sha256:1ih7vx4i16np1p8ig5faw74apmbm7kgyj9alya521yvzid6d7pzd";
2018-02-03 08:35:22 +00:00
};
2021-11-05 15:14:30 +00:00
propagatedBuildInputs = [
isodate
html5lib
pyparsing
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
2021-11-05 15:14:30 +00:00
];
2018-02-03 08:35:22 +00:00
passthru.optional-dependencies = {
html = [
html5lib
];
networkx = [
networkx
];
};
2021-11-05 15:14:30 +00:00
checkInputs = [
pytestCheckHook
]
++ passthru.optional-dependencies.networkx
++ passthru.optional-dependencies.html;
2018-02-03 08:35:22 +00:00
pytestFlagsArray = [
# requires network access
"--deselect=rdflib/__init__.py::rdflib"
"--deselect=test/jsonld/test_onedotone.py::test_suite"
];
2021-11-05 15:14:30 +00:00
disabledTests = [
# Requires network access
"test_service"
"testGuessFormatForParse"
] ++ lib.optionals stdenv.isDarwin [
2021-11-08 21:12:32 +00:00
# Require loopback network access
"TestGraphHTTP"
2021-11-05 15:14:30 +00:00
];
2018-02-03 08:35:22 +00:00
2021-11-05 15:14:30 +00:00
pythonImportsCheck = [
"rdflib"
];
2018-02-03 08:35:22 +00:00
2021-11-05 15:14:30 +00:00
meta = with lib; {
description = "Python library for working with RDF";
homepage = "https://rdflib.readthedocs.io";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
2018-02-03 08:35:22 +00:00
};
}