diff options
Diffstat (limited to 'pkgs/development/python-modules/pyrdfa3/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyrdfa3/default.nix | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/pyrdfa3/default.nix b/pkgs/development/python-modules/pyrdfa3/default.nix index ef6d33cb8e804..51f6411cb4fb4 100644 --- a/pkgs/development/python-modules/pyrdfa3/default.nix +++ b/pkgs/development/python-modules/pyrdfa3/default.nix @@ -1,17 +1,19 @@ { lib , buildPythonPackage -, fetchPypi , fetchpatch -, isPy27 -, rdflib +, fetchPypi , html5lib +, pythonOlder +, rdflib +, setuptools }: buildPythonPackage rec { pname = "pyrdfa3"; version = "3.5.3"; - format = "setuptools"; - disabled = isPy27; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit version; @@ -21,6 +23,7 @@ buildPythonPackage rec { patches = [ (fetchpatch { + # https://github.com/RDFLib/pyrdfa3/pull/40 name = "CVE-2022-4396.patch"; url = "https://github.com/RDFLib/pyrdfa3/commit/ffd1d62dd50d5f4190013b39cedcdfbd81f3ce3e.patch"; hash = "sha256-prRrOwylYcEqKLr/8LIpyJ5Yyt+6+HTUqH5sQXU8tqc="; @@ -31,21 +34,28 @@ buildPythonPackage rec { substituteInPlace setup.py \ --replace "'html = pyRdfa.rdflibparsers:StructuredDataParser'" "'html = pyRdfa.rdflibparsers:StructuredDataParser'," \ --replace "'hturtle = pyRdfa.rdflibparsers:HTurtleParser'" "'hturtle = pyRdfa.rdflibparsers:HTurtleParser'," + # https://github.com/RDFLib/pyrdfa3/issues/31 + substituteInPlace pyRdfa/utils.py \ + --replace "imp," "" ''; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ rdflib html5lib ]; - # Does not work with python3 - doCheck = false; - - pythonImportsCheck = [ "pyRdfa" ]; + pythonImportsCheck = [ + "pyRdfa" + ]; meta = with lib; { description = "RDFa 1.1 distiller/parser library"; - homepage = "https://www.w3.org/2012/pyRdfa/"; + homepage = "https://github.com/prrvchr/pyrdfa3/"; + changelog = "https://github.com/prrvchr/pyrdfa3/releases/tag/v${version}"; license = licenses.w3c; maintainers = with maintainers; [ ambroisie ]; }; |