1{ lib, buildPythonPackage, fetchPypi
2, chardet
3, inflect
4, jinja2
5, jinja2_pluralize
6, pygments
7, six
8# test dependencies
9, coverage
10, mock
11, nose
12, pycodestyle
13, pyflakes
14, pylint
15, pytest
16}:
17
18buildPythonPackage rec {
19 pname = "diff_cover";
20 version = "5.0.1";
21
22 preCheck = ''
23 export LC_ALL=en_US.UTF-8;
24 '';
25
26 src = fetchPypi {
27 inherit pname version;
28 sha256 = "e80f7a4979b7a9d373903776588279ed2898f17729e608255c4119462c822edb";
29 };
30
31 propagatedBuildInputs = [ chardet jinja2 jinja2_pluralize pygments six inflect ];
32
33 checkInputs = [ mock coverage pytest nose pylint pyflakes pycodestyle ];
34
35 # ignore tests which try to write files
36 checkPhase = ''
37 pytest -k 'not added_file_pylint_console and not file_does_not_exist'
38 '';
39
40 meta = with lib; {
41 description = "Automatically find diff lines that need test coverage";
42 homepage = "https://github.com/Bachmann1234/diff-cover";
43 license = licenses.asl20;
44 maintainers = with maintainers; [ dzabraev ];
45 };
46}