2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lxml,
|
|
|
|
lxml-html-clean,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "html-text";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.6.2";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-05-15 15:35:15 +00:00
|
|
|
owner = "zytedata";
|
2022-10-06 18:32:54 +00:00
|
|
|
repo = "html-text";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-e9gkibQv8mn1Jbt77UmpauOeTqhJQhY9R5Sge/iYi+U=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-10-06 18:32:54 +00:00
|
|
|
lxml
|
2024-05-15 15:35:15 +00:00
|
|
|
lxml-html-clean
|
2022-10-06 18:32:54 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "html_text" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Extract text from HTML";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://github.com/zytedata/html-text";
|
|
|
|
changelog = "https://github.com/zytedata/html-text/blob/${version}/CHANGES.rst";
|
2022-10-06 18:32:54 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ambroisie ];
|
|
|
|
};
|
|
|
|
}
|