depot/third_party/nixpkgs/pkgs/development/python-modules/pyrdfa3/default.nix
Default email d2947cfef0 Project import generated by Copybara.
GitOrigin-RevId: 598f83ebeb2235435189cf84d844b8b73e858e0f
2022-10-06 20:32:54 +02:00

42 lines
955 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, rdflib
, html5lib
}:
buildPythonPackage rec {
pname = "pyrdfa3";
version = "3.5.3";
disabled = isPy27;
src = fetchPypi {
inherit version;
pname = "pyRdfa3";
sha256 = "sha256-FXZjqSuH3zRbb2m94jXf9feXiRYI4S/h5PqNrWhxMa4=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'html = pyRdfa.rdflibparsers:StructuredDataParser'" "'html = pyRdfa.rdflibparsers:StructuredDataParser'," \
--replace "'hturtle = pyRdfa.rdflibparsers:HTurtleParser'" "'hturtle = pyRdfa.rdflibparsers:HTurtleParser',"
'';
propagatedBuildInputs = [
rdflib
html5lib
];
# Does not work with python3
doCheck = false;
pythonImportsCheck = [ "pyRdfa" ];
meta = with lib; {
description = "RDFa 1.1 distiller/parser library";
homepage = "https://www.w3.org/2012/pyRdfa/";
license = licenses.w3c;
maintainers = with maintainers; [ ambroisie ];
};
}