1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, rdflib
6, html5lib
7}:
8
9buildPythonPackage rec {
10 pname = "pyrdfa3";
11 version = "3.5.3";
12 disabled = isPy27;
13
14 src = fetchPypi {
15 inherit version;
16 pname = "pyRdfa3";
17 sha256 = "sha256-FXZjqSuH3zRbb2m94jXf9feXiRYI4S/h5PqNrWhxMa4=";
18 };
19
20 postPatch = ''
21 substituteInPlace setup.py \
22 --replace "'html = pyRdfa.rdflibparsers:StructuredDataParser'" "'html = pyRdfa.rdflibparsers:StructuredDataParser'," \
23 --replace "'hturtle = pyRdfa.rdflibparsers:HTurtleParser'" "'hturtle = pyRdfa.rdflibparsers:HTurtleParser',"
24 '';
25
26 propagatedBuildInputs = [
27 rdflib
28 html5lib
29 ];
30
31 # Does not work with python3
32 doCheck = false;
33
34 pythonImportsCheck = [ "pyRdfa" ];
35
36 meta = with lib; {
37 description = "RDFa 1.1 distiller/parser library";
38 homepage = "https://www.w3.org/2012/pyRdfa/";
39 license = licenses.w3c;
40 maintainers = with maintainers; [ ambroisie ];
41 };
42}