lol

python312Packages.trafilatura: refactor

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