2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-06-26 10:26:21 +00:00
|
|
|
, chardet
|
2023-05-24 13:37:59 +00:00
|
|
|
, hatchling
|
2021-09-18 10:52:07 +00:00
|
|
|
, html5lib
|
|
|
|
, lxml
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, soupsieve
|
2022-04-27 09:35:20 +00:00
|
|
|
, sphinxHook
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, html-sanitizer
|
|
|
|
, markdownify
|
|
|
|
, mechanicalsoup
|
|
|
|
, nbconvert
|
|
|
|
, subliminal
|
|
|
|
, wagtail
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "beautifulsoup4";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "4.12.2";
|
|
|
|
format = "pyproject";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
outputs = ["out" "doc"];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-SSu8adyjXRLarHHE2xv/8Mh2wA70ov+sziJtRjjrcto=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
nativeBuildInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
hatchling
|
2022-06-26 10:26:21 +00:00
|
|
|
sphinxHook
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-06-26 10:26:21 +00:00
|
|
|
chardet
|
2021-09-18 10:52:07 +00:00
|
|
|
soupsieve
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
html5lib = [
|
|
|
|
html5lib
|
|
|
|
];
|
|
|
|
lxml = [
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bs4"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit html-sanitizer
|
|
|
|
markdownify
|
|
|
|
mechanicalsoup
|
|
|
|
nbconvert
|
|
|
|
subliminal
|
|
|
|
wagtail;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://git.launchpad.net/beautifulsoup/tree/CHANGELOG?h=${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "HTML and XML parser";
|
2023-05-24 13:37:59 +00:00
|
|
|
homepage = "http://crummy.com/software/BeautifulSoup/bs4/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ domenkozar ];
|
|
|
|
};
|
|
|
|
}
|