tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.trafilatura: refactor
Fabian Affolter
2 years ago
a8e2c36b
6a0968be
+15
-15
1 changed file
expand all
collapse all
unified
split
pkgs
development
python-modules
trafilatura
default.nix
+15
-15
pkgs/development/python-modules/trafilatura/default.nix
reviewed
···
1
1
{ lib
2
2
, buildPythonPackage
3
3
-
, fetchPypi
4
4
-
, pytestCheckHook
5
5
-
, pythonOlder
6
3
, certifi
7
4
, charset-normalizer
8
5
, courlan
6
6
+
, fetchPypi
9
7
, htmldate
10
8
, justext
11
9
, lxml
12
12
-
, urllib3
10
10
+
, pytestCheckHook
11
11
+
, pythonOlder
13
12
, setuptools
13
13
+
, urllib3
14
14
}:
15
15
16
16
buildPythonPackage rec {
···
25
25
hash = "sha256-5oM9KauKE+2FOTfXyR5oaLxi774QIUrCsQZDbdI9FBI=";
26
26
};
27
27
28
28
-
nativeBuildInputs = [
28
28
+
# Patch out gui cli because it is not supported in this packaging and
29
29
+
# nixify path to the trafilatura binary in the test suite
30
30
+
postPatch = ''
31
31
+
substituteInPlace setup.py \
32
32
+
--replace-fail '"trafilatura_gui=trafilatura.gui:main",' ""
33
33
+
substituteInPlace tests/cli_tests.py \
34
34
+
--replace-fail "trafilatura_bin = 'trafilatura'" "trafilatura_bin = '$out/bin/trafilatura'"
35
35
+
'';
36
36
+
37
37
+
build-system = [
29
38
setuptools
30
39
];
31
40
32
32
-
propagatedBuildInputs = [
41
41
+
dependencies = [
33
42
certifi
34
43
charset-normalizer
35
44
courlan
···
55
64
"test_redirection"
56
65
"test_whole"
57
66
];
58
58
-
59
59
-
# patch out gui cli because it is not supported in this packaging
60
60
-
# nixify path to the trafilatura binary in the test suite
61
61
-
postPatch = ''
62
62
-
substituteInPlace setup.py \
63
63
-
--replace-fail '"trafilatura_gui=trafilatura.gui:main",' ""
64
64
-
substituteInPlace tests/cli_tests.py \
65
65
-
--replace-fail "trafilatura_bin = 'trafilatura'" "trafilatura_bin = '$out/bin/trafilatura'"
66
66
-
'';
67
67
68
68
pythonImportsCheck = [
69
69
"trafilatura"