at 23.11-beta 79 lines 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, chardet 5, hatchling 6, html5lib 7, lxml 8, pytestCheckHook 9, pythonOlder 10, soupsieve 11, sphinxHook 12 13# for passthru.tests 14, html-sanitizer 15, markdownify 16, mechanicalsoup 17, nbconvert 18, subliminal 19, wagtail 20}: 21 22buildPythonPackage rec { 23 pname = "beautifulsoup4"; 24 version = "4.12.2"; 25 format = "pyproject"; 26 27 outputs = ["out" "doc"]; 28 29 disabled = pythonOlder "3.6"; 30 31 src = fetchPypi { 32 inherit pname version; 33 hash = "sha256-SSu8adyjXRLarHHE2xv/8Mh2wA70ov+sziJtRjjrcto="; 34 }; 35 36 nativeBuildInputs = [ 37 hatchling 38 sphinxHook 39 ]; 40 41 propagatedBuildInputs = [ 42 chardet 43 soupsieve 44 ]; 45 46 passthru.optional-dependencies = { 47 html5lib = [ 48 html5lib 49 ]; 50 lxml = [ 51 lxml 52 ]; 53 }; 54 55 nativeCheckInputs = [ 56 pytestCheckHook 57 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 58 59 pythonImportsCheck = [ 60 "bs4" 61 ]; 62 63 passthru.tests = { 64 inherit html-sanitizer 65 markdownify 66 mechanicalsoup 67 nbconvert 68 subliminal 69 wagtail; 70 }; 71 72 meta = with lib; { 73 changelog = "https://git.launchpad.net/beautifulsoup/tree/CHANGELOG?h=${version}"; 74 description = "HTML and XML parser"; 75 homepage = "http://crummy.com/software/BeautifulSoup/bs4/"; 76 license = licenses.mit; 77 maintainers = with maintainers; [ domenkozar ]; 78 }; 79}