2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
chardet,
|
|
|
|
hatchling,
|
|
|
|
html5lib,
|
|
|
|
lxml,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
soupsieve,
|
|
|
|
sphinxHook,
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +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";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.12.3";
|
|
|
|
pyproject = true;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-06-05 15:53:02 +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;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-dOPRko7cBw0hdIGFxG4/szSQ8i9So63e6a7g9Pd4EFE=";
|
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
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
html5lib = [ html5lib ];
|
|
|
|
lxml = [ lxml ];
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
pytestCheckHook
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "bs4" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests = {
|
2024-06-05 15:53:02 +00:00
|
|
|
inherit
|
|
|
|
html-sanitizer
|
2023-10-09 19:29:22 +00:00
|
|
|
markdownify
|
|
|
|
mechanicalsoup
|
|
|
|
nbconvert
|
|
|
|
subliminal
|
2024-06-05 15:53:02 +00:00
|
|
|
wagtail
|
|
|
|
;
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|