1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 lxml,
6 lxml-html-clean,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "html-text";
14 version = "0.6.2";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "zytedata";
21 repo = "html-text";
22 tag = version;
23 hash = "sha256-e9gkibQv8mn1Jbt77UmpauOeTqhJQhY9R5Sge/iYi+U=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 lxml
30 lxml-html-clean
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "html_text" ];
36
37 meta = with lib; {
38 description = "Extract text from HTML";
39 homepage = "https://github.com/zytedata/html-text";
40 changelog = "https://github.com/zytedata/html-text/blob/${version}/CHANGES.rst";
41 license = licenses.mit;
42 maintainers = with maintainers; [ ambroisie ];
43 };
44}