1{ lib 2, beautifulsoup4 3, buildPythonPackage 4, chardet 5, fetchFromGitHub 6, lxml 7, pkg-config 8, pkgs 9, pytestCheckHook 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "html5-parser"; 15 version = "0.4.11"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "kovidgoyal"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-l7cCt+zX+qOujS6noc1/p7mELqrHae3eiKQNXBxLm7o="; 25 }; 26 27 nativeBuildInputs = [ 28 pkg-config 29 ]; 30 31 buildInputs = [ 32 pkgs.libxml2 33 ]; 34 35 propagatedBuildInputs = [ 36 chardet 37 lxml 38 ]; 39 40 nativeCheckInputs = [ 41 beautifulsoup4 42 pytestCheckHook 43 ]; 44 45 pythonImportsCheck = [ 46 "html5_parser" 47 ]; 48 49 pytestFlagsArray = [ 50 "test/*.py" 51 ]; 52 53 meta = with lib; { 54 description = "Fast C based HTML 5 parsing for python"; 55 homepage = "https://html5-parser.readthedocs.io"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ ]; 58 }; 59}