From 48919bc2246e23673b322dd02c347473cc67380d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sun, 28 Nov 2021 15:34:49 +0100 Subject: [PATCH] python310Packages.extruct: init at 0.13.0 --- .../python-modules/extruct/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/extruct/default.nix diff --git a/pkgs/development/python-modules/extruct/default.nix b/pkgs/development/python-modules/extruct/default.nix new file mode 100644 index 000000000000..39591ac55fa2 --- /dev/null +++ b/pkgs/development/python-modules/extruct/default.nix @@ -0,0 +1,61 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonRelaxDepsHook +, html-text +, jstyleson +, lxml +, mf2py +, pyrdfa3 +, rdflib +, six +, w3lib +, pytestCheckHook +, mock +}: + +buildPythonPackage rec { + pname = "extruct"; + version = "0.13.0"; + + src = fetchFromGitHub { + owner = "scrapinghub"; + repo = "extruct"; + rev = "v${version}"; + sha256 = "sha256-hf6b/tZLggHzgFmZ6aldZIBd17Ni7vCTIIzhNlyjvxw="; + }; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + # rdflib-jsonld functionality is part of rdblib from version 6 onwards + pythonRemoveDeps = [ + "rdflib-jsonld" + ]; + + propagatedBuildInputs = [ + html-text + jstyleson + lxml + mf2py + pyrdfa3 + rdflib + six + w3lib + ]; + + checkInputs = [ + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "extruct" ]; + + meta = with lib; { + description = "Extract embedded metadata from HTML markup"; + homepage = "https://github.com/scrapinghub/extruct"; + license = licenses.bsd3; + maintainers = with maintainers; [ ambroisie ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 80911fa28a81..33ea0833e9c1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3138,6 +3138,8 @@ in { extras = callPackage ../development/python-modules/extras { }; + extruct = callPackage ../development/python-modules/extruct { }; + eyeD3 = callPackage ../development/python-modules/eyed3 { }; ezdxf = callPackage ../development/python-modules/ezdxf { };