1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
{
lib,
buildPythonPackage,
fetchPypi,
fetchpatch,
# build-system
hatchling,
# docs
sphinxHook,
# dependencies
soupsieve,
typing-extensions,
# optional-dependencies
chardet,
charset-normalizer,
faust-cchardet,
html5lib,
lxml,
# tests
pytestCheckHook,
# for passthru.tests
html-sanitizer,
markdownify,
mechanicalsoup,
nbconvert,
subliminal,
wagtail,
}:
buildPythonPackage rec {
pname = "beautifulsoup4";
version = "4.15.0";
pyproject = true;
outputs = [
"out"
"doc"
];
src = fetchPypi {
inherit pname version;
hash = "sha256-KI48p9VLBvKsGRlwvCdcGTnLRtRQslW/ZxiwSqN6tPc=";
};
build-system = [ hatchling ];
nativeBuildInputs = [ sphinxHook ];
dependencies = [
soupsieve
typing-extensions
];
optional-dependencies = {
chardet = [ chardet ];
cchardet = [ faust-cchardet ];
charset-normalizer = [ charset-normalizer ];
html5lib = [ html5lib ];
lxml = [ lxml ];
};
nativeCheckInputs = [
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
disabledTests = [
# fail with latest libxml, by not actually rejecting
"test_rejected_markup"
"test_rejected_input"
];
pythonImportsCheck = [ "bs4" ];
passthru.tests = {
inherit
html-sanitizer
markdownify
mechanicalsoup
nbconvert
subliminal
wagtail
;
};
meta = {
changelog = "https://git.launchpad.net/beautifulsoup/tree/CHANGELOG?h=${version}";
description = "HTML and XML parser";
homepage = "http://crummy.com/software/BeautifulSoup/bs4/";
license = lib.licenses.mit;
maintainers = [ ];
};
}
|