blob: 5226a7eb763474da97b4d6d0e6109bcd178e80ca (
plain) (
blame)
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
|
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, charset-normalizer
, dateparser
, lxml
, pytestCheckHook
, python-dateutil
, urllib3
, backports-datetime-fromisoformat
}:
buildPythonPackage rec {
pname = "htmldate";
version = "1.7.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-AqgA3SJMv3S/SDsEL2ThT1e6DkDGtEBLKE6YvGwwto0=";
};
propagatedBuildInputs = [
charset-normalizer
dateparser
lxml
python-dateutil
urllib3
] ++ lib.optionals (pythonOlder "3.7") [
backports-datetime-fromisoformat
];
nativeCheckInputs = [
pytestCheckHook
];
# disable tests that require an internet connection
disabledTests = [
"test_input"
"test_cli"
"test_download"
];
pythonImportsCheck = [ "htmldate" ];
meta = with lib; {
description = "Fast and robust extraction of original and updated publication dates from URLs and web pages";
homepage = "https://htmldate.readthedocs.io";
changelog = "https://github.com/adbar/htmldate/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ jokatzke ];
};
}
|