1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 lxml,
7}:
8
9buildPythonPackage rec {
10 pname = "justext";
11 version = "3.0.1";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "miso-belica";
16 repo = "jusText";
17 rev = "refs/tags/v${version}";
18 hash = "sha256-9i7hzCK/ijh8xw9l2ZbVhVj5IBf0WD/49/R1tSWgqrQ=";
19 };
20
21 propagatedBuildInputs = [ lxml ];
22
23 nativeCheckInputs = [ pytestCheckHook ];
24
25 # patch out coverage report
26 postPatch = ''
27 substituteInPlace setup.cfg \
28 --replace " --cov=justext --cov-report=term-missing --no-cov-on-fail" ""
29 '';
30
31 pythonImportsCheck = [ "justext" ];
32
33 meta = with lib; {
34 description = "Heuristic based boilerplate removal tool";
35 homepage = "https://github.com/miso-belica/jusText";
36 changelog = "https://github.com/miso-belica/jusText/blob/v${version}/CHANGELOG.rst";
37 license = licenses.bsd2;
38 maintainers = with maintainers; [ jokatzke ];
39 };
40}